• Breaking News

    Friday, July 27, 2018

    Just a dumb debugging story to let you know that you aren't alone in your frustrations learn programming

    Just a dumb debugging story to let you know that you aren't alone in your frustrations learn programming


    Just a dumb debugging story to let you know that you aren't alone in your frustrations

    Posted: 27 Jul 2018 01:14 PM PDT

    So, I have been programming for almost a year now, having done a bootcamp and switching careers. Like any programmer, I'm learning everyday. This of course involves debugging. Misery loves company, so I thought I would share this little tale.

    I was trying to edit some css on the screen right? And everything was broken, but only by the tiniest of margins. Like everything on the screen was running over the border, but not by much. I was flummoxed as I had barely changed any of the css, so I'm in the devtools debugging, trying every single thing I can think of. Spend at LEAST an hour beating my head against this damn elusive css bug, only to then realize that I had my browser zoomed in to 95% somehow and the css was all actually fine. Smh.

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

    why is the else: statement here in Python2 not indented?

    Posted: 27 Jul 2018 02:28 PM PDT

    https://imgur.com/a/A0bIlao

    why is the else: statement here in Python2 not indented? For statements can have elses attached to them? I thought that was only for if statements.

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

    Do people who still write C tend to like it for not having too many features?

    Posted: 27 Jul 2018 02:45 PM PDT

    Obviously there is performance too.
    'Not enough features' seems like the common reason for people these days to not use it. I was wondering if multi purpose libraries for C like ZPL could be a selling point for C, for someone who is deciding between the C path, or the C++ path. The end goals are mainly to interface with modern languages, and systems programming for Linux.
    edit: It's not that I'd marry a language and only learn one in my life, but I like to try and think in terms of not too many years down the road. This is all coming from someone who is pretty used to Python, and on the rare occasion that PHP and JavaScript were necessary I've used those.

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

    I would like to one day get a job as a programmer. I don't live in a city with a huge tech population, so networking in the traditional sense is hard. What else can I do to distinguish myself?

    Posted: 27 Jul 2018 05:12 PM PDT

    In addition to the above, I don't intend on getting a programming job in my city anyway. I currently work full time as an engineer in a plant, but I don't find my job all that exciting for fulfilling anymore. I have always been very interested in programming and have had a little bit of exposure to programming. Two classes in school used MATLAB as the primary medium for the course, and I have used VBA a good bit at work, but mostly for basic stuff.

    I am currently working on CS50 on nights and weekends and have really been enjoying it. I am about two-thirds of the way through with it and I already have some ideas about what I want to do next.

    I don't live in a city that has a very large tech population, so meet-ups and traditional networking aren't very accessible to me. If I want to be serious about programming and eventually change careers, what else can/should I be doing to distinguish myself when I don't have these traditional resources?

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

    I just finished John Sonmez's "The Complete Software Developer's Career Guide". This is a must read.

    Posted: 27 Jul 2018 04:21 PM PDT

    For the last year I've been struggling to teach myself development. Things werent clicking for me, I didn't understand how these things I was learning applied to my future in the industry.

    More importantly I didnt see any way of breaking into the industry, it seemed an impossible feat as a self taught programmer. After reading this book everything has moved into gear and the wheels are moving.

    My intentions have never been more clear about what I'm supposed to do and how I'm going to do it. I recommend this book highly to anyone who is confused about tech and programming and their place in it.

    EDIT - REASONS

    I am being accused of being too vague, that's because what this book clarified may be a bit vague. It clarified everything for me, but the two main areas of clarification were on Unit Testing and finding jobs.

    Before this book I didnt know what testing was, didnt think it was necessary, I mean shit I've deployed apps without tests before... can't be that important. I now know what TDD is and have already begun to implement it in my software. I also know that I should be actively testing my code and not relying on QA to find bugs.

    In regards to finding work, one thing in specific he said stuck with me. I can become a lead software developer right now if I want to, all I have to do is create an LLC, launch software and bam I can put software developer on my resume and it is not a lie. He doesn't suggest lying if asked about the company and even believes that you will be looked upon favorably for taking the initiative to start a software company.

    On top of this he gives amazing insight into the history of software development culture and has great stories about the early 2000s at HP. As someone who has been in programming for less than a year, this has provided immense value as I've been given a doorway to something I doubt I would've seen otherwise.

    Apologies for being too vague before. I was eating a Buffalo Chicken Salad and was typing on my phone. Doesn't lend itself to detailed posts.

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

    How does CSS positioning work?

    Posted: 27 Jul 2018 02:40 PM PDT

    I forgot most of my CSS. This thread made me want to relearn positioning. Can someone explain how to tame positioning? How to make things hover over (and not hover over) and all that? The other CSS is easier to find but positioning is the least understood part

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

    Am i following the right path or am i just setting myself up for failure? Need a job in 6-9 months where i can learn more

    Posted: 27 Jul 2018 08:26 PM PDT

    Hey guys, big time lurker here. First post so bear with me. (TL;DR below)

    I'm working at a dead end job (all heard this before, eh?) and recently, since I don't have a degree nor can I afford one or plan to get one, I've decided to suck up and learn programming. Basically, the goal is to become a software engineer, a good one at that (Realistic? Mostly been seeing posts regarding front end web development).

    For now, I would like to learn to be able to land a junior software engineer position. I've been working at my current job as a medical scribe for the past 1 year minus the "training" I got. I do have 6-9 months before there's a chance the company might get rid of me because, well, company.

    I've started following P1XT's guide from Github, "Job Ready Guide - Python Edition". The reason is that it has a course type format where I know where to start and where it will end. Problem is, i'm already stuck on YDKJS Up and Going Chapter 2 -_-.

    So just a few Q's,

    Am I following the right path? For too long, i've been confused as to what language I should go for but eventually, after going through countless posts, I've started to understand that it doesn't matter what language I pick. But I did want something that would lead to my goal hence the Python guide.

    If i'm not doing the right thing, would someone please guide me or help me out? Would really appreciate it.

    Last but not least, i'm sorry if there is a post like this but I couldn't find any and I needed to vent, badly! Thanks! Would appreciate any help!

    (TL;DR) Need help. Following P1xt's guide. Confused if its the right path. Need to land a job in 6-9 months if possible, junior level. Also will need someone to ask questions directly if someone would take the pain. Sorry, for the trouble. First post, thanks!

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

    Issues with Scrapy with Python

    Posted: 27 Jul 2018 11:12 PM PDT

    Hey there! For some reason Scrapy has been malfunctioning for me today. I'll open a Scrapy shell and scrape a title from a post on a sub Reddit with no issues. Then I'll quit the shell. Hen I try to do the same exact thing again, when I go to scrape the title again, it returns an empty list.

    Sometimes when I uninstall and re install Scrapy it'll work again. None of my previous spiders return anything anymore either.

    I know this might not be enough info, I can provide more as needed, but any help would be appreciated. I just started a small personal project that involved web scraping and this is hindering my progress. Thanks in advance!

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

    What I learned teaching myself programming for five years

    Posted: 27 Jul 2018 11:05 PM PDT

    Hi Reddit, I have been teaching myself programming for five years since leaving college.

    Recently I shared "what I would do differently if I was learning to program again". But the post was too shallow and missed out on lots of important details. Therefore, since then I have taken some time to share, in more details, my lessons from the years of self-learning programming. I hope the following is helpful to you. There are TLDRs for each one.

    What to build when learning to code

    https://dnote.io/blog/what-to-build-when-learning-to-code/

    tldr: A great way to learning programming is to build actual software. But many times we are not even sure what to build because ideas are hard to come by. In such case, build your own ideas, rather than being told to build some random things. It works because uncertainty is the best teacher you can get. Ideas can be scarce, so maintain a personal backlog of ideas. Take a look at my Trello board where I get project ideas.

    Build shitty stuff that works

    https://dnote.io/blog/build-shitty-stuff-that-works/

    tldr: The hardest part about learning programming is (1) building things that work and (2) coming to terms with the fact that they are shit. To keep learning without giving up, build something you can use every day. Make peace with the fact that your code will be shit. If you are not convinced, listen to the shitty original songs I am making as a beginner musician. Coding is no different. Let us build our things good and bad. Mostly they will be garbage and that is okay.

    Write down what you learn while programming

    https://dnote.io/blog/write-down-what-you-learn-while-programming/

    tldr: Many people will tell you to learn by getting your hands dirty, but such advice is overrated. The reason is that it ignores the fact that we forget things quickly. Unless we write down and revisit them later, we forget new lessons exponentially. The field of programming is so vast that without a conscious effort to retain what we learn, we will end up forgetting all the time. How many "How to Build X" or "Learn X in Y minutes" materials have you consumed, and how much knowledge have you actually retained to this date? In this article, I share the system I developed for years to retain new lessons.

    Get your program out there

    https://dnote.io/blog/get-your-program-out-there/

    tldr: Launching your programs to the world is just as important as building them. Programming is much more than coding and it is sad that many of us focus solely on writing code and neglect other aspects such as communication and collaboration. Also, we might be hampering our growth by putting too much ego on our code. Here I share my journey of overcoming the fear of sharing my code by collaborating with strangers, giving talks around the world and finding my community.

    Be humble as a programmer

    https://dnote.io/blog/be-humble-as-programmer/

    tldr: Being able to program can make us arrogant and prevent us from learning. We need to discard the elitist culture that often forms in a tech community because programming is a grassroots movement where everyone can become as great as they can be without certification. We can learn to become humble again by (1) not name-dropping things and (2) respecting professions other than programmers. Nothing worse than phrases such as "use SQL to corrupt their databases." Name-dropping arcane concepts do not make us look smarter! And being able to program is just a skill. It does not automatically make us smarter than everyone else in the room.

    Stop looking for advice

    https://dnote.io/blog/stop-looking-for-advice/

    tldr: The best advice you can get while learning to program is the advice you do not get because you are too busy building and shipping. The hard truth is that almost all advice is a part self-promotion and a part attempt at being helpful. Do not look for magical, abstract advice that will take you to the next level. Instead, take baby steps by getting help to solve small problems you face.

    Hope it helped

    Keep building your crazy ideas and shun advice that claims to take you to the next level. I guess it is kind of funny for me to advise you to not to look for advice because it sort of undermines my whole premise. But I am willing to conclude this series by completely and ironically destroying itself that way if that is what it takes to honestly convey what I have learned in the past five years.

    Don't be afraid if you are embarking on a journey of learning programming. I have been there and I still am, just as countless others before you. Recently I wished to have been told these things at the time I had started learning. But I realize now that I can instead share these with others in the shoes of my past self. If these lessons can help you, their job will have been done.

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

    Do you know any Python IDE with dark background?

    Posted: 27 Jul 2018 09:26 PM PDT

    I installed [Thonny Python IDE](https://thonny.org/) and I was able to run my [code](https://i.imgur.com/amdSSfk.png) after clicking [run](https://i.imgur.com/nTGSrleg.png] button. The problem is, this IDE doesn't have dark background, which hurts my eyes, unlike Sublime.

    I want to run my code directly from sublime txt. Problem is, after I save it as "python proj.py" file, then open (double click) the "python proj.py", it will still open in Thonny IDE editor, then I still have to press the "run script" or F5 just to actually run the script like [this](https://i.imgur.com/amdSSfk.png).

    I tried uninstalling Thoony IDE then open .py file but [this](https://i.imgur.com/l6R3HI8.png) shows.

    Dude I can't do the (save in Sublime > Open .py file > Run Script) everytime I edit a piece of code... I'm looking for an IDE with a dark background that I can save my code then [run the script](https://i.imgur.com/amdSSfk.png), done.

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

    C++ help!

    Posted: 27 Jul 2018 08:04 PM PDT

    Hey guys i'm trying to get into programming and I've been having tons of fun with it _. However I've been stuck on this exercise called "Pancake Glutton". The instructions are...

    "Write a program that asks the user to enter the number of pancakes eaten for breakfast by 10 different people (Person 1, Person 2, ..., Person 10) Once the data has been entered the program must analyze the data and output which person ate the most pancakes for breakfast.

    ★ Modify the program so that it also outputs which person ate the least number of pancakes for breakfast."

    My programs issue is that it does not want to show the minimum (Smalllest) amount of pancakes or which person that ate it.

    include <iostream> using namespace std;

    int x, i; int Largest = 0; int max_person = 0; int Pancake[5]; int Smallest = 0; int min_person = 0;

    int main(){

    for (int i = 1; i <= 5; i++){

    cout << "Person " << i << " Ate this many Pancakes." << endl;

    for(int x = 0; x <= 5; x++){

    cin >> Pancake[x];

    cout << Pancake[x] << " Pancakes" << endl;

    break; }

    for (int x = 0; x < 5; x++){ if (Pancake[x] > Largest){ Largest = Pancake[x]; max_person = i; }else if(Smallest > Pancake[x]){ Smallest = Pancake[x]; min_person = i; }

    }

    }

    cout << "Largest amount of pancakes " << Largest << endl;

    cout << "By Person " << max_person << endl;

    cout << "Smallest amount of pancakes " << Smallest << endl;

    cout << "By Person " << min_person << endl;

    return 0; 

    }

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

    What are some good resources to learn Spring and Hibernate?

    Posted: 27 Jul 2018 09:36 AM PDT

    I am almost done with University of Helsinki MOOC for Java and now I am planning to learn Spring and Hibernate. Could anyone here recommend some good resources that teaches the basics well?

    I tried the first few videos from Chad Darby's Udemy course but I gave up after a while because he uses a lot of technical jargon for a supposedly beginner's course.

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

    [Javascript] Simple question about 'And' and 'OR' operators

    Posted: 27 Jul 2018 11:20 PM PDT

    I just have a simple javascript question in regards to && and || that I'm confused about, consider the following (made up example):

    if(hungerLevel < 10 && food === 'good' || food === 'decent') { return 'Let's eat' } 

    Is the above example saying this: If hungerLevel < 10 and food === 'good', then return Let's eat. Or if food === 'decent' then return Let's eat

    Or is it saying this: If hungerLevel < 10 and food === 'good', then return Let's eat. Or if hungerLevel < 10 and food === 'decent' then return Let's eat

    I hope that makes sense, thank you.

    EDIT: Thanks guys, I'm no longer confused :)

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

    resources to learn porting

    Posted: 27 Jul 2018 01:21 PM PDT

    I'd like to be able to port a source port of doom to other devices. Any good book or website that could teach the basics of porting?

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

    Are other languages like assembly as beautiful and fun as c++?

    Posted: 27 Jul 2018 10:35 PM PDT

    I know a bit random but any input? Are the the other languages nearly as fun and amazingly beautiful to use as c++?

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

    Not really trying to defend bootcamps, but when people say whatever bootcamps teach is self-learnable, is it really? realistically?

    Posted: 27 Jul 2018 10:30 PM PDT

    I'm considering a bootcamp as a career changer, I have an engineering degree in ME and worked in the industry for 2 years. I've read in many posts that whatever is taught at bootcamps are all self-learnable.

    I've gone through the syllabus of top bootcamps and yea, the concepts learned seemed like something out of a udemy course. However, I've been watching alot of youtube videos of students projects, and I wonder, how can I learn to do all that in 3 months by myself.

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

    Good programming books?

    Posted: 27 Jul 2018 10:26 PM PDT

    I know a little c# I tried to make a fully functional tic tac toe game and failed so I have decided to maybe read some books instead of just use moocs. Any advice?

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

    Any suggestions for choosing a programming field?

    Posted: 27 Jul 2018 10:16 PM PDT

    Hi everyone. I have an engineering degree and next year, I'll apply for business administration in masters degree (both completely irrelevant to programming :D). In the meantime, I'd like to do/learn something useful. I've been truly madly deeply wanting to learn programming and I have a basic knowledge of python. Is there any field related to business stuff? If not, which field you guys suggest me to get into? I just know some names (web development, data mining, etc) but I have zero knowledge of what they actually are. I'm open to any ideas, but I prefer the ones with python.

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

    inserting text files into python. wrong results, help

    Posted: 27 Jul 2018 10:05 PM PDT

    EDIT: I fixed it, my stupid laptop saved my txt file in a weird way. i had to change it a bit.

    Im trying to insert a text file i created into my python script. It all works for the most part except it doesnt display all of the text in my .txt file. it only displays the last line. Here it is what i have in my .txt file (In my txt file it doesnt have the quotes its just so you know thats whats in the text file) :

    "This is stuff I typed into a file.

    It is really cool stuff.

    Lots and lots of fun to have in here."

    Here is my code:

    from sys import argv

    script, filename = argv

    txt = open(filename)

    print "Here's your file %r:" % filename

    print txt.read()

    print "I'll also ask you to type it again:"

    file_again = raw_input("> ")

    txt_again = open(file_again)

    print txt_again.read()

    Here is what i get:

    Macbook-Studio-Pro:learn_python Zach$ python ex15.py ex15_sample.txt

    Here's your file 'ex15_sample.txt':

    Lots and lots of fun to have in here.

    I'll also ask you to type it again:

    > ex15_sample.txt

    Lots and lots of fun to have in here.

    EDIT: I fixed it, my stupid laptop saved my txt file in a weird way. i had to change it a bit.

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

    What shall I focus on learning during my non-thesis masters?

    Posted: 27 Jul 2018 10:01 PM PDT

    Hello,

    I finished my Bachelors in CS last semester and will be starting my five year combined master program (non-thesis).

    The purpose of this program is to augment my education by taking more classes (special topics, grad-level courses, etc.).

    I am a student who is mainly interested in Software Engineering and I want to be a Software Engineer that can incorporte ML/AI functionalities into product/services that I get to build.

    I am trying to use this Masters opportunity to take courses in special topics like ML/AI and strengthen my SW engineering knowledge by taking some advanced courses in that topic.

    My question is, will taking ML/AI be useful even if I don't want to get into research level ML/AI?

    Three courses that I will be taking are: AI, Software Engineering, and HCI with ML (Explores the use of data-driven methods to support creative design processes by examining recent work in human computer-interaction, product design, cognitive science, machine learning, graphics, vision, and natural language processing.)

    Do these courses seem useful for my stated goal?

    Also, if you guys were me, how would you use this 1 additional year? Of course I will be practicing coding intervies in my free time, but academic-wise what would you focus on?

    Thanks in advance.

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

    Funky Algorithm error + Algorithm help

    Posted: 27 Jul 2018 09:57 PM PDT

    int main() { string keystring; string message; string ciphertext; int i; cout << "What is the key\n"; //asking user for key cin >> keystring; cout << "What is the message you would like to encrypt?\n"; cin >> message; //encryption algorithm string C = ciphertext; string T = message; string K = keystring; for (i = 0; i < T.length(); i++) { C.at(i) = (T.at(i) + K.at(i)) % 26; } cout << C << endl; } 

    I'm having trouble with the code above. I'm getting a funky error and I'm having a great deal of trouble with this part specifically:

     string C = ciphertext; string T = message; string K = keystring; for (i = 0; i < T.length(); i++) { C.at(i) = (T.at(i) + K.at(i)) % 26; } cout << C << endl; 

    Edit: Additional Information

    The error: Thread 1: signal SIGABRT

    What is outputted:

    libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string

    (lldb)

    Edit 2: The algorithm I'm trying to use:

    Ci = Ti + Ki (mod m)

    Ci - i-th character of the ciphertext
    Ti - i-th character of the open text
    Ki - i-th character of the key phrase (if the key phrase is shorter than the open text, which is usual, than the keyphrase is reapeated to math the length of the open text)
    m - length of the alphabet

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

    C# First time using, Unity Error

    Posted: 27 Jul 2018 03:55 PM PDT

    I am attempting to create a situation where the "Player" while near a well will see text that says "Press E to interact", and if E is pressed, a particle event appears. I had the text working fine, but in my attempt to add the keypress, everything has fallen apart. I mostly tried to plug in portions of code from videos to suit my needs. This is my last week of class and there hasn't actually been any instruction on coding besides "Watch tutorials", and Unity just updated and has been crashing every 10-15 minutes, so I'm struggling with this.

    using System.Collections;

    using System.Collections.Generic;

    using UnityEngine;

    public class DisplayText : MonoBehaviour

    {

    public string text;

    bool display = false;

    // Use this for initialization

    void Start()

    {

    }

    // Update is called once per frame

    void Update()

    {

    }

    void OnTriggerEnter(Collider iCollide)

    {

    if (iCollide.transform.name == "Player")

    {

    display = true;

    }

    }

    void OnTriggerExit(Collider uCollide)

    {

    if (uCollide.transform.name == "Player")

    {

    display = false;

    }

    }

    void OnGUI()

    {

    if (display == true)

    {

    GUI.Box(new Rect(0, 50, Screen.width, Screen.height - 50), text);

    }

    }

    public class control : MonoBehaviour

    {

    public Transform Interact;

    void Start()

    {

    Interact.GetComponent<ParticleSystem>().enableEmission = false;

    }

    void OnTriggerEnter(Collider iCollide)

    {

    if (Input.GetKeyDown(KeyCode.E))

    {

    Interact.GetComponent<ParticleSystem>().enableEmission = True;

    //This is the true has an error (does not exist in current context).

    }

    }

    }

    }

    There are also some deprecated values :EnableEmission, but the suggested fix just pops up more errors. I wouldn't mind a complete overhaul, but I'm really trying to understand what is happening here.

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

    Anyone familiar with an assembler language CASL II?

    Posted: 27 Jul 2018 09:44 PM PDT

    Im living in japan and am currently attending school aiming to get a license as a Fundamental Information Technology Engineer (FE)

    I just passed the first stage of the exam (yay to me) and now we're at the stage of learning an assembler program called CASL II. I was told that CASL II is an assembler language developed exclusively for the FE exam so i looked it up and to my surprise saw a few examples of codes that relates to it.

    So my questions are: Are there guys familiar or fluent with it? If so how did you learn it? Are there free materials on the internet for it? I thought this was exclusive for the FE exam in japan, are there people applying this for practical use?

    Thank you!

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

    Looking to make a firefox extension. I know what i want to create but would like pointers on how to go about.

    Posted: 27 Jul 2018 09:32 PM PDT

    So i have basic programming knowledge in php, javascript, html, c++ C#

    what i would like to do is pull information off of one site and push it towards a different site. something simple i'd say?

    Any pointers/refreshers to help me out to get back on track to do this would be great. thank you

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

    No comments:

    Post a Comment