• Breaking News

    Friday, May 24, 2019

    [Recommendation] College student here and looking for textbook(s) to study for over the summer break. learn programming

    [Recommendation] College student here and looking for textbook(s) to study for over the summer break. learn programming


    [Recommendation] College student here and looking for textbook(s) to study for over the summer break.

    Posted: 24 May 2019 11:24 AM PDT

    I am a community college student and will be transferring to a university in September. So I thought for my upcoming summer vacation (3 months), I'd like to get a little ahead.

    Finished courses: one data structure course, one discrete math course, two java courses, two C++ courses, one assembly NASM course.

    What are resources that you guys would recommend? Could be hard copy or online medium of course!

    Thank you guys!

    Edit: OMG! So many sound advice in this thread! I'm going to save this thread forever!

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

    Resources for learning the “soft skills” of programming - commenting, version control, GitHub, etc

    Posted: 24 May 2019 09:07 AM PDT

    I'm teaching myself how to program, and for the most part, it's going well. I have a very strong background in mathematics, so I don't have issues with abstract thinking, problem solving, or coming up with clever (but not too clever) solutions. I'm also pretty good at reading and understanding technical jargon, and some of the resources in the FAQ (and Google) have been very helpful in my learning. My goal is to eventually get a full-time programming job, and I feel like I'm making good progress toward that goal.

    That being said, I would like to start paying attention to some of the other skills a good programmer should have. How do I organize and format my code? How do I write good code and avoid writing bad code? Why is version control important, and how do I best implement it into my projects? What are the best practices on commenting code? How should I use GitHub to store and share my code? Is there anything else important to consider that I've just never heard of?

    I know a lot of these questions are cultural or language specific, but I'm looking for more of an overview on these topics. I also know that once I get a job programming, I'll probably be able to pick up all these skills pretty quickly, but I'm not working with anyone else right now, and I want to make sure that when I do start working with other people, the beginnings of these skills are already in place.

    What are some good articles, essays, blog posts, books, videos, podcasts, or anything else that might help me with these kinds of concepts? I'm sure I can (and probably will) Google around for resources, but recommendations from a human are always better than search engine results.

    I'm primarily using python right now, but I occasionally use C++ and Swift.

    Thanks so much for any help you're able to give!

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

    Why is my tic tac toe segfaulting?

    Posted: 24 May 2019 09:54 PM PDT

    My tic tac toe game keeps returning segmentation faults to me whenever I run it. Can you look through this piece of code and find the source of the problem? Code:

    include <stdio.h>

    include <string.h>

    int main()

    { char tttarray[3][3];

    int quit = 0; int win = 0; int turn = 1; int loopinit = 1; int xc = 0; int yc = 0; int x = 'x'; int o = 'o'; while ( loopinit = 1 ) { printf ( "%s", tttarray ); if ( quit == 1 ) { printf( "A player quit." ); loopinit = 0; } else if ( win == 1 ) { printf( "A player won! Reload game." ); loopinit = 0; } if ( turn == 1 ) { printf( "It is X's turn. " ); printf( "Enter X coordinate: " ); scanf( "%d", &xc ); printf( "Enter Y coordinate: " ); scanf( "%d", &yc ); strcat(tttarray[xc][yc], x); printf ( "%s", tttarray ); turn = 2; } else if ( turn == 2 ) { printf( "It is O's turn. " ); printf( "Enter X coordinate: " ); scanf( "%d", &xc ); printf( "Enter Y coordinate: " ); scanf( "%d", &yc ); strcat(tttarray[xc][yc], o); printf ( "%s", tttarray ); turn = 1; } } 

    }

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

    [General Question] Why am I spending 90% of my time fighting my computer?!

    Posted: 24 May 2019 02:27 PM PDT

    I've noticed something: I am a pretty ok programmer in that I can create and run my own scripts fairly easily. Be it Python or Java, etc. That's not the problem. The problem I've been facing is this: Every time I want to run someone else's code, or want to use some community built application from Github, etc. I spend 90% of my time flighting my computer in order to get things to run. It's always the same. There is usually some dependency missing, or some path error, and then I spend 20 minutes googling how to fix this problem, only to be faced with the next one.

    I enjoy writing code, but I hate wasting my time on trying to figure out why my native node.js version is different from my homebrew node.js version, or why some directory path is wrong, or why something is pointing to a wrong dependency, or version...

    Is this normal, or is there some easy way to avoid all of this? Am I fundamentally doing something wrong?

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

    Intro to HTML5 Game Development - trying to teach in YouTube tutorials, would love feedback!

    Posted: 24 May 2019 05:07 PM PDT

    How should you present your web portfolio?

    Posted: 24 May 2019 04:53 PM PDT

    This might be a real silly question, but I don't know how web developers show there website in an interview. I've yet to experience one personally and was wondering whether you'd give out links or showcase them personally on a computer you'd bring with you?

    Do you even have to buy a domain and do the whole set up process or can you just give out a print out portfolio with the websites you've designed.

    I don't know whether I'd have to buy domains and hosting for all these practice websites I'm creating to show these potential employers.

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

    I would like to learn how to create video editing software. how to start ?

    Posted: 24 May 2019 06:17 PM PDT

    I would like to know how video editing software work. so i would like to code one by myself for educational purpose. where to start or what keyword should i search ?

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

    I created an algorithm that generates 50! Sudoku Grids

    Posted: 24 May 2019 04:18 PM PDT

    I need to know how to use a poly-time verifier correctly, and Google has been vaguely helpful. Here's the algorithim that generates 50! Sudoku grids and I need to chek their validity.

    Update: I have a link of a manually grid.

    https://cdn.hackaday.io/files/1652867071596224/output.txt

    tup = ['[01]','[02]','[03]','[04]','[05]','[06]','[07]','[08]','[09]','[10]','[11]','[12]','[13]','[14]','[15]','[16]','[17]','[18]','[19]','[20]','[21]','[22]','[23]','[24]','[25]','[26]','[27]','[28]','[29]','[30]','[31]','[32]','[33]','[34]','[35]','[36]','[37]','[38]','[39]','[40]','[41]','[42]','[43]','[44]','[45]','[46]','[47]','[48]','[49]','[50]'] squares = [] for index in range(len(tup)): tup.append(tup.pop(0)) squares.append(tup.copy()) #Everything below here is just printing for s in range(5): for d in range(0,50,10): for si in range(s,50,10): for li in range(d,d+10): print(squares[si][li], end = '') print('') x = ???? def check_sudoku(x): z= zip(*x) #matrix transpose for i in x: if len(i)!=len(set(i)):#removes duplicates then checks length return False for j in z: if len(j)!=len(set(j)): return False return True 
    submitted by /u/Hope1995x
    [link] [comments]

    [python] Helping a colleague learn Programming

    Posted: 24 May 2019 09:32 AM PDT

    I am an advanced programmer, started in about middle school with bash, took night school courses in high school and advanced stuff in college. While technically I am a statistician programming has always been something I enjoy and there is enough overlap that I consider my job to be a programming job.

    I recently switched jobs and am a manager at a large consulting firm, I am acting as the technical lead on a project. One of my employees is a really nice guy, recent college graduate, very sharp. However he just really hates programming and is very new to it. Does anyone have tips or ideas for how I can help him get up to speed without totally making him miserable? He's very analytics focused and has coded a decent amount in R. My ambition is two fold 1) get him to a point where he doesn't get stymed and frustrated at simple things and 2) find a way that programming becomes enjoyable for him because there is no chance he won't have to program a significant amount with his role or analytics ambitions.

    If anyone has any advice that would be fantastic, it can be hard to remember back to how difficult it was as a beginner.

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

    I created a website. Does it work?

    Posted: 24 May 2019 11:24 PM PDT

    This website https://photo-s.herokuapp.com is a kind of simple image sharing service.

    Uploaded image will be deleted in 2 days automatically.

    Feel free to upload images but no NSFW things.

    (I'm leaning programming and English.)

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

    [Java] I want to learn what is the internet like (excuse my expressions) sockets, http, urls but I do not know what to google to find a good tutorial?

    Posted: 24 May 2019 11:16 PM PDT

    I am learning how to make apps in android studio but I am kinda stuck at Urls, websites and internet in general. I am really good at java but I almost 100% program things that work offline, but now I am getting into this tutorial from udemy and he (the instructor) is talking about Urls and how to get a website Html code and I am not understanding a single word. I want to look for a tutorial/video/series of videos that explains what is the underlying mechanism behind connecting to the internet and what all of these strange abbreviations mean (IP, DNS, socktes, HTTP) because I literally do not understand a single word of them. TL:DR I am looking for an ELI5 internet tutorial because I do not know what to google.

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

    [Game Engine] Is Godot relevant? Does it have future? what's your opinion on this engine and its language?

    Posted: 24 May 2019 11:15 PM PDT

    Hi everyone, I'm new to programming, and after trying Corona (with LUA) and finding out it did't really fit me, I am now playing around with Godot (I'm starting with GdScript, but I know it can be used with other languages) and I'm liking it a lot.

    So, I wanted to know whats your opinion about this egine/language... do you like it, do you not? why?

    Also, if you have any resources they will be welcomed!

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

    Neck pain when on the computer?

    Posted: 24 May 2019 11:04 PM PDT

    I exercise regularly and have decent posture. My monitor is aligned with my eyes and i am not looking down. I purchased an ergonomic chair and rest my arms on the desk when using the keyboard/mouse. Blue light fighter is turned on and i have tried many neck strengthening exercises but nothing is working. After 30 minutes my neck start to hurt (right side mainly) and this then causes me to have a headache and ruins the rest of the day.

    Does anyone know any other neck strengthening exercises perhaps?

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

    Question about porting a python module into a C program

    Posted: 24 May 2019 11:01 PM PDT

    Hello, newby here

    I was reading this page about python gui, I have red this:

    ''Any code that you write using any compiled language like C, C++, or Java can be integrated or imported into another Python script. This code is considered as an "extension."

    A Python extension module is nothing more than a normal C library. On Unix machines, these libraries usually end in .so (for shared object). On Windows machines, you typically see .dll (for dynamically linked library).''

    https://www.tutorialspoint.com/python/python_further_extensions.htm

    Basically if I write a ''module'', a ''script'' in python this can than be integrated into a C programm as .dll like it had been written in C? There aren't discordances (one

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

    Is there a point in using design patterns in tests?

    Posted: 24 May 2019 10:41 PM PDT

    Wondering whether I should design patterns in my tests. I have seen that some people do, they use stuff like dependency injection and other things.

    Honestly I don't know that I need something like that. Tests don't seem like something that should be overly complex.

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

    I’ve been given a project in my high school computer science class to learn a programming language

    Posted: 24 May 2019 10:30 PM PDT

    The language I was given is C because it's a language that I'll need to learn next year in my university program. More notably I'm supposed to do it in a "Linux environment". I put that in quotes because I have absolutely no experience with Linux

    In regards to learning the language itself what programs, resources, IDEs have people found useful?

    I know for Java I had to download a JDK. Is there anything like this for C?

    Any suggestions would be helpful

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

    Job opportunity slipping through my fingers because I am too dumb

    Posted: 24 May 2019 10:25 PM PDT

    Nepotism is a lovely thing. A friend of mine got me a job as a developer at a great company, where I am eventually supposed to help him maintain and improve a Java tool he created for the company and work on other development projects.

    Here's the kicker: when I started I didn't know how to program AT ALL and had NO experience in any STEM field.

    This opportunity was definitely a huge shortcut to a career in software development. I am approximately 3.5 months into learning Java now, at my current job. I am spending a good 8-10 hours a day doing something related to programming in Java.

    The path I am taking has looked like this up til present:

    Before starting the job:

    I attempted the Helsinki University Java MOOC, which was difficult to say the least, and in retrospect, is actually fucking terrible for anyone absolutely new to programming. I studied and "practiced" through their practice problems around 1-2 hours per day for a month. I only got halfway through it, barely solving any problems without googling the solutions, before my friend that got me the job told me to rush through the other half before starting the job (basically read 6 weeks of material in 2 weeks and I didn't do any of the practice problems.)

    So this whole experience gave me this really shitty foundation, with a little practice using if statements and iterations.

    Start of the job:

    For the first couple of days, at the behest of my friend, I went over a few Java lessons on Code Academy, which gave me some understanding of methods.

    Then for the next two months, my friend and I basically wrote two applications using Swing. His style of teaching is, I've since discovered, to belittle and berate me for being confused... and I was confused... a lot.

    For two months, I struggled as I either watched him write the application--while I was completely lost as to what he was doing--or me sitting in front of my computer, trying to extrapolate how to build on and improve the program we had been building. In actuality I was sitting there, dumbly staring at my monitor and going nowhere.

    We did very little theory during this whole time--you know, things like how methods are built and interact with the main, Swing itself, what constructors are, control flow, data structures etc. The only theory involved was my friend walking me through the code he was writing, and belittling me every time I spoke up about not getting a concept.

    The only thing I can say I got from this was brief exposure to a shit ton of terms and concepts, with only a vague understanding of how it all fit together.

    Finally, at a staff meeting where I had to present how the fuck my progress was coming, it became obvious that almost no progress had been made in two months. My team is cool though, so they offered up some advice about self-learning methods, which I gladly took.

    Now, at this point, my friend thinks I am a bottom-of-the-barrel, knuckle-dragging idiot. He's made this quite clear many times because I hadn't learned Java up to his standard in our first two months, even after going through the Helsinki MOOC.

    2 months into job:

    So I took the advice of my coworkers, and taught myself how to learn. I read two textbooks on Java in 3 weeks. I practiced control flow, and really tried to understand how I could use things such as nested for loops and ArrayLists. And, as mentioned, the exposure to the programs my friend and "I" wrote previously helped me understand the theory I was reading about in the books and online.

    My friend and I then went back and did some more coding for a new application. Lo and behold, I can actually code a fair fucking amount now. It's not amazing code, but it works well enough. I feel like I am improving every day the more I code, a far-cry from the snail's pace I was at just a few months ago.

    My friend is not impressed. While he recognizes that I have improved "marginally" (in my opinion, IMMENSELY) since I learned some theory, he thinks I am not cut out for programming, that I am not analytical enough to handle it, and that I am probably not long for this job, and that I should just drop programming completely and try another career.

    I want to program as a career, but I have my doubts now, especially after taking his abuse about my intelligence for 3.5 months. Is the rate at which I've learned REALLY that slow? Or was the learning strategy in the beginning to blame? I've never had this much trouble learning ANYTHING in my entire life. If he's right, I may be setting myself up for failure.

    Should the average non-programmer be able to be proficient in Java after 3.5 months of training 8-10 hours a day?

    TL;DR: I think I may be too dumb to be a good programmer after spending 3.5 months, 8-10 hours a day practicing Java and still not being proficient in it.

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

    Building a web app and iOS app that are in sync

    Posted: 24 May 2019 09:49 AM PDT

    Background: I have a mild amount of exposure to programming, but nowhere near the level to figure this out. I need a resource to learn how to build a web app and iOS app that sync data. I want to understand how to host everything, setting up the database, learning how these sync. Any resources or help would be much appreciated as I am definitely a noob. Also, any terminology on what to look for or learn would be appreciated.

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

    [college] Required to take comp sci 1 for Physics degree. Completely Lost.

    Posted: 24 May 2019 09:55 PM PDT

    Everything written in C.

    • Create a student structure to store student's last name (one word), scores for one assignment, M

    quizzes (M is a user input), final exam, and total.

    • Take number of students N and number of quizzes M as the input. Dynamically allocate memory for N

    students. For each student dynamically allocate memory to store scores of M quizzes. Take input for all

    the scores for quizzes, assignments, and final exams for all the students. Calculate the total scores for

    each student and store it in the corresponding structure. Do this whole task in a separate method and

    return the appropriate pointer.

    This is honestly out of my league. I understand pointers, I understand arrays, and I understand structures. But all of this is way above my understanding. I've tried looking up tutorials but come out more confused or end up with nothing.

    Edit: I will return in the morning to post the work I have done so far.

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

    What’s the best strategy to improve programming skills for a student after front end development experience?

    Posted: 24 May 2019 09:04 PM PDT

    I am a CS major student, and along with school assignments, I started learning web development because it was hot. However, after few months of training in front end, I am already exhausted by the numerous different technologies that I have to learn from scratch. I was thinking about learning backend but I want to take a break from web development, and I want to do something that involves pure programming, not designing, and which is easier to start with. What are your suggestions? What path would you take?

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

    Google School of Coding

    Posted: 24 May 2019 09:00 PM PDT

    Does anyone have any idea how to choose a project for an organisation, I want to get into GSOC but have no idea how to handle the 'selecting and doing the project' part.

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

    [python] Aligning equivalent entries from 2 files

    Posted: 24 May 2019 09:00 PM PDT

    So I have 2 lists of lists where I need to line up the matching entries. But I can only check for a match based on the 3rd index of the sublists, because they look like:

    [number number number string] where the numbers could differ, but if the strings match, then I want the list aligned with its counterpart.

    So I might have 2 lists to align the entries, each containing a dozen or so sublists. I am inserting blank sublists to get the alignment right.

    I was working on this by FOR looping over 1 list and inserting blank entries on the fly into both, but quickly discovered that was a bad idea because it would screw up the counting index of the loop in some situations.

    So I transitioned to FOR looping over 1 list and then populating 2 new lists for correct alignment. And that's where I am stuck. The code currently doesn't work right - the issue is that if I'm not editing the list as I'm iterating it, I can't check if the 2 lists become aligned after making one, or two, or three, etc corrections.

    I fear that I've got lost in the weeds. I've tried a few approaches to this and found a dead end at each of them. It seems like such a simple task - there has to be a simpler way of doing it than insanely length if/else/for blocks. I even found this SO entry that seems to describe my exact problem.. but to be quite honest I have no idea what this guy's code is doing.

    Here is my code:

    # My 2 lists to compare have been created already as left_items and right_items # Blank lists so we can build the new, aligned ones left_copy, right_copy = ([] for i in range(2)) # Now we can compare the 2 lists and insert empty lines where necessary for line in left_items: left_index = left_items.index(line) if line[3] != right_items[left_index][3]: for list in right_items: if line[3] in list: right_index = right_items.index(list) if right_index > left_index: for i in range(right_index-left_index): left_copy.append("") else: for i in range(left_index-right_index): right_copy.append("") break else: left_copy.append("") else: left_copy.append(line) right_copy.append(line) 

    Any help is appreciated. Thank you

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

    After I try to rename my word files, I can't access them anymore for some reason?

    Posted: 24 May 2019 08:59 PM PDT

    (Javascript) I am using the fs package to rename some files. For most files it works perfectly fine, and I can still open the files after they have been renamed. Word files in particular however, seem to give me some trouble.

    I can rename them, but they can no longer be opened. I'm not sure why this occurs only for word files, but I'm not sure if it's because I am concatenating the extension on the end for the new name. Alternatively, if there is a better/another way to preform this operation please let me know.

     fs.rename("data/uploaded_files/" + res.locals.file_name, "data/uploaded_files/" + fields.checksum + res.locals.file_extension, (err) => { if (err) throw err; }); 

    This code is used for renaming the file.

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

    How to effeciently determine if a 3D box is floating?

    Posted: 24 May 2019 08:49 PM PDT

    I'm sorry if my wording is a bit confusing.

    I have an array of rectangular boxes. Each box has its coordinate of its first corner (x, y, z) and its dimensions (width, height, length). A box cannot be floating, which means it has to be rest on ground (y=0) or on other boxes.

    How do I check if there is any floating boxes in the array and if there are, move them vertically down (so it's not floating) but no boxes can be overlapped with each other.

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

    No comments:

    Post a Comment