• Breaking News

    Saturday, April 20, 2019

    Learn to code by watching other developers work. learn programming

    Learn to code by watching other developers work. learn programming


    Learn to code by watching other developers work.

    Posted: 19 Apr 2019 12:46 PM PDT

    Hey, I'm a product designer learning JavaScript and I'm building a tool that helps people like me to learn to code by watching other developers work.

    It uses the Rubber Duck methodology (that you explain while you are programming) so it's easy to understand what the other person was doing.

    Check it out https://gitduck.com and would be great to hear your feedback.

    submitted by /u/mmmbc
    [link] [comments]

    Is it worth putting effort into learning assembly programming ?

    Posted: 19 Apr 2019 07:36 PM PDT

    I'm currently in a course that started with C programming, and then now we're trying to learn what's working behind the abstraction of a high level language.

    Unfortunately, I just can't seem to understand assembly for the love of god. I'm just dragging my feet through class at this point.

    It is a lot of effort, but is it even worth it ? My GPA is excellent, so I can afford to put minimal effort for this class and take a hit to my GPA.

    I just need some ideas and reasons as to why is it worth for me to invest a lot of time and resources into mastering assembly programming, because I think I could be diverting that time to learning something else that is more relevant.

    submitted by /u/aitheahole
    [link] [comments]

    How should I learn C++ in 2019 (coming from Python)?

    Posted: 19 Apr 2019 05:41 PM PDT

    I am interested in C++ as I feel most of Python frameworks are written in C++ (or C) and Python is just behaving as a wrapper. I also feel like there are concepts that I am not introduced to with just Python, that I may appreciate or understand with C++. Also Windows is written in C++ right? (Linux in C)

    I have a really old book that I found used (1998 on C++, but I feel as it it's outdated).

    So what are some of the best books to really understand C++ (coming from Python).

    submitted by /u/bakamito
    [link] [comments]

    segmentation fault (core dumped)?

    Posted: 20 Apr 2019 12:34 AM PDT

    I was trying out a program when i run this program i got this error

    i searched it but didn't get the solution.

    i'm using gcc compiler and codeblocks ide on ubuntu 18.04

    code -

    #include<stdio.h> int fact(int x) { if (x=0) { return 1; } else { return x*fact(x-1); } } int main() { int a,c; printf("Enter a No. "); scanf("%d",&a); c=fact(a); printf("The Fact is %d",c); return 1; } 
    submitted by /u/SSlender_Boy
    [link] [comments]

    Are there any online tools for identifying patterns in a set of strings?

    Posted: 19 Apr 2019 08:47 PM PDT

    I'm writing a program for work that basically parses a spreadsheet, and needs to identify. So far I can get it to read the column headers for the data, but I need to be able to identify what the header is describing, and assign it to a variable. Up to this point, I've just manipulated the files myself and then hardcoded what variables the program looks for, but going forward I want to avoid doing that.

    The problem is, because the spreadsheets are manually created, the creators often use inconsistent variable names from file to file. For example, you could see "Force_X", "force_x", "FORCE_X", "Fx", "Force X", "force x", and so on, all describing the same column of data.

    I thought of just bypassing the headers, and just scraping the contents of the column without worrying about the header name, but I can't just assume "force x" is always in the same column (col 1,2,3 whatever) because the data is captured digitally, but manually set up. So depending on who sets it up, the channel that is capturing the data for a given variable can change. Think of a TV: You have HDMI 1, HDMI 2, etc. But if the connected devices are always unplugged and moved and replugged in, you can't always assume HDMI 1 = Xbox, for example. So, you might accidentally capture data related to your Chromecast if you don't check the header.

    I was told I can handle this using regular expressions. I'm using Matlab to do this. I don't come from a software background, so I'm not really familiar with regular expressions. Is there an online tool where I can put in a list of potential strings, and it could help me identify the patterns I need the regex code to capture?

    submitted by /u/SquirrelicideScience
    [link] [comments]

    Looking for great tutorials or games to learn programming for kids

    Posted: 19 Apr 2019 08:43 PM PDT

    Not Scratch

    submitted by /u/justanotheranon8
    [link] [comments]

    How to solve a real world problem - Plan and Build a website status monitor

    Posted: 19 Apr 2019 05:58 AM PDT

    A couple of days ago my website went down and I didn't realize it until someone PM'd me on reddit a few hours later, so I decided to make a simple program to monitor my website and notify me so I know and can go fix any issue with my website quickly

    I figured this was a good opportunity to make the kind of tutorial I wish was around when I was learning to code. I'm a self-taught developer and it always seemed like most tutorials were extremely esoteric and didn't focus on real world problem solving or realistic situations. This problem seemed like the perfect opportunity because it doesn't require advanced programming skills to fix and doesn't take a ton of time.

    The main idea behind the video is to show how to think about using code to solve a problem and how to make a short plan before jumping into the code

    https://www.youtube.com/watch?v=eB21e97RQEY

    submitted by /u/renaissancetroll
    [link] [comments]

    Do you think a person who is good and fast in google fu is a cheater? Thinking of streaming quiz solving where I will showcase my problem solving method.

    Posted: 19 Apr 2019 11:35 PM PDT

    If in a timed quiz I get the answer by googling not the answers rather tips or guides to the answers should I be considered a cheater? My workflow and everyone else that I know of googles stuff like every 5 minutes while coding.

    submitted by /u/anyfactor
    [link] [comments]

    Am I getting into programming for the right reasons?

    Posted: 19 Apr 2019 01:20 PM PDT

    I'm trying to get into programming because I want it as a skill set that could compliment me either as an electrician, or journalist, or something. At the very least, as a way to freelance and make money online.

    Lately I've been hard-up for cash. Completely broke and dependent on my parents. I was and still am originally following step-by-step tutorials on Udemy where I learned how to use Python creating ethical hacking tools, and am tempted to buy a bootcamp course.

    I didn't expect the courses to make me an expert programmer by the end of them, or even a novice, but I figured it would be a good idea if I had some hand-holding while learning Python to minimize errors and make sure things go a little more as expected while learning core concepts.

    However, my desire for money got the best of me, and after I saw I could make money online by building a web scraper for someone, I decided to go and dive right into that. After all, I always hear people say that the best way to learn how to be a programmer is by working on a project that you care about.

    However, I've been spending almost the entire day, from 4:00 AM to 2:00 PM trying to make a web scraper using some simple code I've seen from various tutorials (creating separate Python projects for each tutorial and following the steps exactly), and none of them work. I can't get past the first few steps.

    I keep running into the same problem: Things missing, and not being able to setup, letalone not even understanding virtual environments. So then I try to follow an online guide on virtual environments, and I get hung-up on that despite following the instructions specifically. I try to power through it, but after about 10 hours of trying to do this shit and making no progress, I'm feeling physically ill, and like I've wasted my time.

    -------------------------------------------------------

    It makes me wonder if I should have just stuck with following the Udemy courses and programming in VirtualBox on Kali Linux. Then it makes me think of why I want to be a programmer in the first place. In reality, I don't want to JUST be a programmer, I just wanted the skill set so that I could make money with it, make use of it when dealing with other techy jobs, and have an advantage that most people in my area do not have.

    -------------------------------------------------------

    The only programming language that I really know the basics of and have some handle on are HTML, CSS, and a little bit of Javascript. I even have a certification from freeCodeCamp for webpage design. However, that didn't satisfy me before because even though I got satisfaction out of making all of those things work, I wasn't interested in designing websites. It seems like such a limited skill, and there's already countless of websites and companies that help with that for laymen, like Wordpress, and Wix. That said, I now have an appreciation for how straight-forward HTML and CSS are, and how much visual feedback they give, and how just being familiar with them helps in making a good web scraper.

    Ethical hacking interested me because the idea of being able to find weaknesses in devices and make them do unexpected things excite me, and I can see how building something like a web scraper can be useful for journalism or some sort of security or investigative work.

    ---------------------------------------------------------

    I guess a lot of this confusion and frustration is coming from the fact that I'm not entirely sure what I'm after with programming. is it knowledge? Power? Being creative? Making money online and becoming financially independent? I don't know where to go with programming yet, but all I know is that so far it's the only thing that has come so close to being doable, affordable, and obtainable in terms of developing a valuable skill, while living out in the middle of nowhere.

    It's kind of like the things with programming that interest me like robotics, electrical circuitry, and security, take awhile to build a career in and aren't very doable in my current circumstances. But the quickest route isn't really that quick, or is over-saturated with competitors.

    Am I pursuing programming the wrong way?

    Also, what can I do as a full stack web developer if I decided to steer away from ethical hacking?

    submitted by /u/Virgin1008
    [link] [comments]

    C/ C++ Programming Help ~ I feel lost

    Posted: 19 Apr 2019 10:30 PM PDT

    Hi

    I am a 2nd year student who's already taken 2 programming classes, out of which one was intro to c++. Now i am taking one C/C++ class and one assembly language class. I feel very lost. I do not get how to implement what I have learned. I cannot program and I really need help. What should I do? I am willing to do anything to become good at it. Where should I start? I also have my final exams in 2 weeks, and I am doing terrible in my c/c++ class. Guide me.

    Thanks.

    submitted by /u/IntrovertedNerd
    [link] [comments]

    Shopping bot

    Posted: 19 Apr 2019 10:14 PM PDT

    Hey guys. I am having difficulty trying to develop a supreme bot. I want the bot to be able to purchase new releases items. But I am having trouble with it. Anyone have any ideas or tips?

    submitted by /u/menareintelligent
    [link] [comments]

    Is a switch statement inside a switch statement possible?

    Posted: 19 Apr 2019 02:12 PM PDT

    I know that you can nest switch statements like this: switch(num) { case 1: var++; case 2: var++; break; }

    But I wanted to know if something like this is possible:

    switch(roomName) { case bedroom: switch (roomObject) case center: SlowType("You're in your bedroom"); break;

    case bedDoor: SlowType("A wooden slab"); break;

    case bookcase: SlowType("Several old books"); break;

    case bed: SlowType("The least dusty thing here"); break;

    case window: SlowType("The starry sky beckons you"); break;

    break;

    case hallway: //Some other stuff like the previous switch statement break; }

    Explanation of variables and functions roomName is just an enum int data type with different rooms assigned to it. Same with roomObject. The idea behind this is that I can re-use items with different rooms while still being able to change the description text when interacting with it. SlowType is a function that takes a string and outputs a char of the string at a time to make it look like someone's typing letters out.

    As of now I'm getting the error "duplicate case" for everything in the second switch statement.

    Thank you for reading

    submitted by /u/PinkFlamess
    [link] [comments]

    Command Line basics and other foundational concepts

    Posted: 19 Apr 2019 05:56 PM PDT

    I know DOS from back in the day, so I understand command line basics. But where can I get a summary of commands to use on Mac OS's terminal?

    I addition, where can I learn other foundational basics? Here is a real world example:

    From the installing Django site https://docs.djangoproject.com/en/2.2/topics/install/#installing-official-release:

    $ pip install -e django/

    Where/how do I begin to understand this command? What directory would I need to be in to run this command? Where would it install Django? And what files would I expect to see there?

    Basically, I feel like there is a huge gap of knowledge before understanding how to even start.

    Thank you in advance for any help.

    submitted by /u/Lowbudgetfun
    [link] [comments]

    [JAVA] Help with delimiters

    Posted: 19 Apr 2019 09:02 PM PDT

    I am trying to write a method that takes Scanner input of a String followed by two integers, separated by commas. The String object is for a full name so it contains a space. Is there any way to use a comma as a delimiter and NOT whitespace? I've tried multiple ways, however when I enter the whitespace in the String object, it moves on to the next integer and does not run correctly.

    I have only learned about useDelimiter(), would it be able to accomplish this task using only this?

    Here is what I have:

    public class Practice { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); keyboard.useDelimiter(","); String name = keyboard.next(); int num1 = keyboard.nextInt(); int num2 = keyboard.nextInt(); System.out.println(name + " " + num1 + " " + num2); } } 
    submitted by /u/SaintPuce
    [link] [comments]

    Sending javascript button press

    Posted: 19 Apr 2019 09:00 PM PDT

    I am using ProScan's web server to connect to my scanner radio, I would like to eventually build an app that triggers some events on the web server. I inspected one of the buttons on the web server and it says:

    <area shape="rect" id="ScannerButton3" coords="510,152,570,180" onmousedown="sendbutton('ScannerButton3,mousedown')" onmouseup="sendbutton('ScannerButton3,mouseup')">

    So I am thinking that I need to send a mousedown and then a mouseup? Maybe with a URL and push that with button that triggers a http push of that url? Any other ideas or ideas on how to implement this?

    submitted by /u/Jason_F2
    [link] [comments]

    Beautiful Soup find_all

    Posted: 19 Apr 2019 08:26 PM PDT

    I'm learning web scraping with Beautiful Soup, I tried to create a script that gets the URL for all the images in a webpage. The code is: ```import requests import bs4 import sys

    if len(sys.argv) > 1: source = sys.argv[1] else: print('Pass the link while starting the script')

    page = requests.get(source) soup = bs4.BeautifulSoup(page.content, 'html.parser') img_tags = soup.find_all('img').attrs['src'] for link in img_tags: print(link)

    I'm getting this error, I don't understand the error, also couldn't find it on StackOverflow:

    Traceback (most recent call last): File "toll_scraper.py", line 12, in <module> img_tags = soup.find_all('img').attrs['src'] File "/usr/lib/python3.7/site-packages/bs4/element.py", line 1620, in __getattr__ "ResultSet object has no attribute '%s'. You're probably treating a list of items like a single item. Did you call find_all() when you meant to call find()?" % key AttributeError: ResultSet object has no attribute 'attrs'. You're probably treating a list of items like a single item. Did you call find_all() when you meant to call find()?

    I know that find_all returns a list I don't understand why I can't access it using for. I'm able to get the link of the first image using find.

    Thanks in advance

    submitted by /u/dead_ancestor_
    [link] [comments]

    Board Poll - Opinion on Starting Language

    Posted: 19 Apr 2019 04:32 PM PDT

    I know there is a ton of information on this topic, and it's highly variable based on what you're doing with it, but based on your personal experience what is the best language to BEGIN learning with?

    1) What is your career field/field of interest? 2) What language did you start with? 3) What language do you currently use the most?

    Also I'm just starting to teach myself Python, I have a little experience with the Wolfram "language" from my time spent using Mathematica during my undergrad (chemistry major) but I'm just beginning to scratch the surface of coding. If anyone is willing to let me get in touch sporadically or be a "mentor" as I'm learning so I can ask all the stupid questions without feeling like I'm spamming the board, please let me know!

    Any other input for a beginner is welcome, thanks!

    submitted by /u/emiweich3
    [link] [comments]

    Discord for programming challenges

    Posted: 19 Apr 2019 04:31 PM PDT

    I found a new Discord for coding challenges and I liked the idea so I'm helping to spread it, any skill level is welcome.

    https://discord.gg/zwaUVek

    submitted by /u/AShittyProgrammer
    [link] [comments]

    Restful service, Java, file db

    Posted: 19 Apr 2019 08:03 PM PDT

    Hey guys,

    I need to create a RESTful API to store information with the basic get/post/update/delete etc commands. All the RESTful stuff is easy, but I am trying to figure out a strategy regarding a strategy.

    I need to store the data in a file as opposed to a db. Probably a JSON object.

    why a file? just go with it, it's a requirement.

    What I am trying to figure out is how to keep the file synchronized if many requests happen at once, in particular ones that are write requests. If I need to do a delete operation, I need to lock the file from read access while these process and then allow the read operation after. This seems to mimic the CAP thereom and it's implications.

    This seems like a semaphore problem, but I am open to suggestions.

    submitted by /u/BertRenolds
    [link] [comments]

    C? C++? Phaser.JS? Which should I choose?

    Posted: 19 Apr 2019 07:39 PM PDT

    Hey there! I've been learning web development and node,js for quite a while now. I can make a decent website using HTML and JS (fuck CSS though). I've made a few chatbots for Discord using node.js (although it gets quite repetitive).

    However, I feel like there's only so much that can be done within a browser, and I want more than that. I decided to learn game development. Not that I prefer game development over anything else, but I just prefer to have a relatively narrow focus when first learning a language, then broaden further as I progress.

    I'm stuck with this question, though. Which of the 3 in the title should I learn? I want to learn C or C++ because I want a deeper understanding of how code works, delving into some lower level code. I'm also fascinated by how powerful these can be.

    Meanwhile, I also want to learn the library phaser.js as a type of "mid-way" point, as it's slightly more difficult than the same old discord.js stuff I'm used to.

    I'm hoping for this community's help. What would be the pros and cons of each of these choices? As a teenager that'll be entering the workforce in a few years, which skills will be the most useful?

    submitted by /u/Futuristick-Reddit
    [link] [comments]

    Essentials Skills every developer should master (besides coding)

    Posted: 19 Apr 2019 03:46 AM PDT

    For those who are learning to code, here is an overview of the other essential skills you need to be a good developer:

    https://fire.ci/blog/essential-skills-every-developer-should-master-besides-coding/

    submitted by /u/jpdelima
    [link] [comments]

    GitHub question - Am I able to work on projects in realtime? eg. C# winform apps, or is it all pushing new code when it's finished?

    Posted: 19 Apr 2019 03:34 PM PDT

    I have a little experience working with GitHub and storing code on there, but I was wondering if you could work on projects directly stored there, or do you need code on your local device and then you can only push new code to the project?

    Thanks!

    submitted by /u/Bohbot9000
    [link] [comments]

    No comments:

    Post a Comment