• Breaking News

    Sunday, December 3, 2017

    Learned to code, got interview at Google but I wish I was told... learn programming

    Learned to code, got interview at Google but I wish I was told... learn programming


    Learned to code, got interview at Google but I wish I was told...

    Posted: 03 Dec 2017 10:12 AM PST

    I started learning to code a few years ago. Went through Codecademy, a bootcamp, and a Udacity nanodegree and got a Google interview. Nice right? Here's what I wish I was told much earlier.

    • Learning to code does not guarantee a career in coding. It gives you coding literacy, which is powerful.
    • Portfolios are so important. I wish I started earlier. Real world experience really matters. Many times in the past, I learned a concept hardcore by debugging well into the night and try to patch something of my own. Knowledge is rarely cemented by one pass through a book.
    • Watch videos and tutorials but also stop watching those and code.
    • Do not shell out tons of money for the sake of education. Education is important don't get me wrong, but when you learn to code it's like running a startup. You are bootstrapping until you turn lead into gold. Ramen noodle profitability is key. Before you purchase a nanodegree or a coursera subscription think hard and google like crazy till you find something gold on the internet. Chances are the internet has good free materials that is created by tons of individual experts. Chances are you need not one but all learning resources till an idea sync and becomes second nature. use your budget wisely.
    • Algorithms really matter and code in C++ or JAVA in addition to Python and Ruby. Ruby and Python allow new programmers to do magic in minutes, but when interviews come around: bit manipulation, memory management, big O.... suddenly, we will realize using Python and Ruby as a beginner to code fancy things is like using a fancy graphic calculator. It can do amazing things, but if the operator has a weak foundation in math, it's still a no go. Remember fibonacci sequence? It's in every basic coding example. You can just write an elegant recursion function. Memorize it why not, there are just a few lines. But soon (except a few years down the road) you will find out that it is not very realistic to calculate anything that grows exponentially. Turns out, beginners like myself have done fibonacci sequence all wrong. There is a lot of room for optimization. Can you do this iteratively? Can you use dynamic programming?
    • Interviews. Like it or not, good companies get a lot of candidates. Many of them brilliant, can communicate and can code. As much as I'd like to think myself as special, really, there are at least thousands of people who can do as well as me graduating every year from colleges around the world. Interviews really do matter, no matter how limiting the format seems. Some interview sites have 600+ questions and growing daily. So one question a day can cost you nearly two years. Unless your have already created a massively popular tool, Google will not hire you. Oh wait, even if you created Homebrew, Google can still tell you to f**k off if you can't invert a binary tree (Google this bit). Start interview prep early unless you are a genius at programming just happened to major in English because you were bored in CS classes. Bonus: my interview experience has been super positive. People are nice now and treat other people right - contrary to what I read about online. I think sometimes the recruiter seems to ignore candidates is because they are super busy. I had someone from a top company called me on a Sunday night. Not because they were being mean, just because that's the first chance they got. They actually wanted to offer helpful advice.
    • Specifically, Google and Facebook are all about really really large datasets. Imagine when iterating through an array becomes a hard problem? If your array stores all hyperlinks that NYTimes links to (internal sites, external, and ads), now imagine that array is chopped and stored across different data centers, now imagine you have to put the links together and query them and display them in milliseconds. Now imagine using an array is too inefficient. What about a trie with linked list nodes? What about scratch all that, that's not how it is done. What if you just have to check if the username matches, except it's Facebook and there are millions of usernames that start with hotchick hotchick21 hotchick_99?
    • Phone interviews are serious, lengthy and rigorous. Top tech holds phone interviews to the same standard as on-site. Consider these interviews technical. One friend was scheduled for a 10 minute conversation about drone, it was technical starting second 0, caught him off guard and didn't go well.
    • Had to say I don't know but also defend myself: hey look I don't know this, but I really think it is related to this ... here're my thought process, and let me find out more and get back to you. Search like crazy and go back with a strong something to show.
    • CS graduates may take up to one year to prep for top company interviews.
    • If you walk your roommate through your white board algorithm session he/she might fall asleep. Be prepared to spend some lonely hours practicing and constantly being questions by your parents and peers why are you doing this to your self.
    • Oh, when you finish that bootcamp, or the video series, chances are there's something new for you to learn. New tech pops up every day. Being a strong mathematician or a general relativity physicist really helps. Hate math? Draw pictures, paint them pink and rainbow, I don't care, just do it. The more your practice, the better you get.
    • Practice lots, read tons of code, write tons of code, dream coding and puke coding. Happy holidays.

    Google interview status: ongoing, better than I thought. Probably going to fail, not the first time. Numb, nervous and excited at the same time yay! Proud of it but also worried about totally freezing up in upcoming interviews. Practicing more.


    EDIT: wow I am shocked. Thank you thank you all for taking time to comment on this! Here're are few points to add. NEW EDIT: I am humbled. Sincerely apologize. My grammar is hopeless...

    These are words of wisdom I heard in the comments below and also in other r/learnprogramming posts:

    • There are hundreds of companies in the world. Don't have to die trying to join Google and Facebook. Grass is not greener on the other side. Also the interview and prep process may be more enjoyable.
    • These prep guidelines may be too "dramatic", "rigorous", "unreasonable". Yes, r/learnprogramming posts have mentioned luck, matter of keep trying (chance), and also don't let the "imposter syndrome" take over. NEW EDIT: Upon graduating from a full stack bootcamp a few years ago, I decided that JavaScript was obviously essential for web development so it was natural for me to use it as my interview language. I had an interview with Walmart Labs (a cool and interesting arm of Walmart and it's local unlike the HQ). The interview was deceivingly simple. He just nested variables in functions and ask me what is the value of the variable when it is placed inside, outside a function, and what does "this" refer to. It was a pure self respect massacre. The questions were clever, simple, elegant and so precise - precisely identified me as a total newb. It was embarrassing. I felt so bad that I wasted this guy's time. He was quiet, patient, did not demean or laugh. After the interview, he thanked me for my time and hung up only when we both said goodbye. I could've buried myself. It was horrendous. It did discourage me a bit. I mean I butchered it, horribly. This experience may explain why I am doing this today.
    • Top tech companies employ smart folks but not all are whom you expect them to be. Don't let the brand or the notion intimidate you.
    • NEW EDIT: Studying all 600 questions is a complete waste of time. Companies actually want to see how you think and break down a new problem. I agree! That being said for bootcamp students and other new programmers, doing 60-100 of these questions can really shed light on knowledge gaps! It happened to me, so I wrote this post. It turns out I am quite good with "puzzles" and "interview questions". I did some hard questions quite okay. OOP implementation, not a problem. Surprisingly Linked List and Pointer, Array, String Manipulation though fundamental, really got me. If you didn't take college CS courses, or only worked with high level languages like Ruby and Python, these will likely be sore spots for you too. Do a few to test your knowledge. The return quickly diminishes after two dozens of questions. It's more important to understand each type of question and how to approach each individual type. Looking for types? Just take a look at Gayle's Cracking the Coding Interview Table of Contents.
    • NEW EDIT: Comments say: you don't have to know all these to be a good programmer. Yes! In plenty of scenarios, being able to hack and integrate and put together a solution of many components prove to be extremely useful. In the real world, problems are rarely well defined. It takes wit to be successful. Algorithms are useful for large scale tech companies where data structure, time complexity and space complexity make a big difference. I met a developer who used bootcamp + self study to make a text based iOS RPG game that massed one million + downloads without a single image. Ingenious. Something about a fire that you need to kindle, shadows in the difference and you will encounter a shadowy figure every once in a while. The ability to SHIP a product is god send. I think it is called A Dark Room, freaking amazing https://www.newyorker.com/tech/elements/a-dark-room-the-best-selling-game-that-no-one-can-explain Mind blowing.
    • Interview moderator / interviewer can be nervous too. Yes! Agreed! In fact, my engineer friends dread talking to people sometimes.
    • This post is useful and useless at the same time. lol Here's a practice question. Please implement a cat class. Create lots of instances. Make sure it eat() play() sleep() and repeat. I wish I can be a cat this Christmas. It'd be nice. Don't forget to while alive: eat() play() if interview: continue sleep()
    submitted by /u/glassjar123
    [link] [comments]

    What fuels me forward when I hit a wall

    Posted: 03 Dec 2017 05:40 AM PST

    A lot of people share their success stories and they are incredibly motivating. However I thought it would be nice to share my two cents when it comes to not being so successful...yet.

    What really got me started with programming was a very clichéd quote: "A year from now, you'll wish you had started today", or something. When it comes to programming, I find it to be very true.

    Teaching yourself to code is hard. Finding the motivation to go forward is harder even. When I seriously began studying I had an unrelated full time job I had worked my ass off to obtain for years and realized I actually did not like, and was studying for my (again, unrelated) MA when I had time. I didn't know anyone in the tech field, and I am a girl, which got me several mocking smirks when I shared my intentions to get into programming with others.

    I would get home tired as fuck but instead of chilling I would study programming. Sometimes I'd wake up earlier to practice before going to work. It was exhausting, but I enjoyed it so I kept going.

    Finding the first language to learn, the right resources, deciding on a schedule, sticking to it, finding out the next step are all things that involve a lot of instances of trial and error. It wasn't always fun, of course. It was frustrating at times, and there were (are) weeks in which I did not make any progress at all! But I kept at it, because fuck it. I tweaked my schedule a hundred times to find what worked for me in order to go forward effectively without burning out, keep my job, my social life, and go on with my MA.

    It is now almost exactly a year from the day I really began teaching myself programming seriously. I obviously still get stuck. Googling how-tos is getting harder because my issues become more and more specific. I still get as frustrated and sometimes I still wonder why I didn't just stick to my career. The times I want to haul my computer out the window are several a month.

    But then I look back. A year ago, I couldn't remember any syntax for more than an hour, and now I am making my own programs. They're not incredible works of art, and buggy, but each one works a little more smoothly, each one is a bit more complex. A year ago, I didn't know what GitHub was, or open source, and now I have several repositories, enjoy contributing, and I am slowly building my portfolio. A year ago I didn't even know what the shell was and how to use it, and now I am using it for all sorts of things the one-year-ago me had not the slightest clue about.

    I have a long way to go, like all of us on this subreddit, but this should not discourage us. When you feel stuck and like an idiot, look back at all the things you have learned. Even if you started one month ago, even a week ago. This was all you! All you sticking to your plan, because fuck it. Imagine yourself one year from now, and all the things that now look complicated being trivial, and all the awesome things you will get to create. It really helps.

    Happy breaking through the walls you are hitting! And best of luck:)

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

    My wife needed a new hobby, so I gave her an old VB6 book

    Posted: 03 Dec 2017 11:42 AM PST

    She did the best she could with it.

    https://imgur.com/a/2bTtj

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

    Learn Programming For Free With A Professional Game Developer

    Posted: 03 Dec 2017 01:24 PM PST

    Hey everyone! My name is Michael Hicks, and I'm a self-taught game developer. I released Pillar for PS4 in 2015, and am currently working on The Path of Motus for PS4 and Xbox One. Throughout the years I've had people ask for info on how to get into game development, so I recently launched a Youtube channel to share all this info in one accessible place. I have an entire video series geared towards helping you learn C# programming. While the series has a big focus on video games (we start programming text-based games within the first couple of hours), I also think it's a great resource for learning programming in general.

    The Intro To C# video series can be found here: https://youtu.be/9yxUHl--aEw?list=PL3wErD7ZIp_Ah6d4--3JWQZ_x5lwrBQZi

    I'm currently working on a new programming series that will walk you through creating a 2D game in FNA, the open source recreation of XNA4. The code we write in this series will enable you to write games for Xbox One, PlayStation 4, Nintendo Switch, PC, Mac, Linux and more! If you're interested in this, you'll be notified when these are uploaded by subscribing to my Youtube channel.

    I also made a video sharing my entire story as a game developer, if you're interested in hearing about the bumps I hit along the road in my journey: https://www.youtube.com/watch?v=7p9LftUgi1s

    Thanks everyone, if you find any of this useful I'd appreciate your help spreading the word!

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

    New programming study group website seeking members for beta

    Posted: 03 Dec 2017 07:13 PM PST

    I am developing a P2P software develop mentorship that, among other things, facilitates group studying around various online programming resources. I am currently seeking learners for feedback and to start up with some actual study groups. If this sounds interesting to anyone, link to the website is here: https://coderpact.com

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

    Programming an app

    Posted: 03 Dec 2017 04:50 AM PST

    I'm working on an app and I know that iOS and android apps run on different languages (iOS being coded on swift, and android on Java).

    Is there a way to code for one and convert to the other platform?

    Edit: Thanks for all the responses! To more specify the function of my app, it will have location services and a group chat function! I've only coded in python and ready/willing to learn a new language! Which language or program would be the best?

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

    populating a page using a javascript for loop

    Posted: 03 Dec 2017 08:46 PM PST

    I have a page which I am trying to populate a page with html div "penguins" multiple times based on the number selected in a dropdown menu. However I cant seem to get my javascript loop to display anything given a users selection. Only classes listed in my html document under the gameholder will appear. I have 8 different penguins I want to randomly select multiple times based on users selection. Each with their own images as seen in the css file.

    This is the source project I am working from.

     $(document).ready( function() { //This code will run after your page loads $(function() { maxPenguin = 64; // dropdown 2-64 possible elements for (var i = 2; i < maxPenguin; i++) { $('select').append('<option value="' + i + '">' + i + '</option>'); var penguinCount = document.getElementById("penguinsSelected").value; } }); // loop through and display $(function displayPenguins(penguinCount){ penguinArray[penguinCount]; for(var i = 0; i < penguinArray.length; i++) { var penguin = document.createElement("penguin" + Math.ceil(Math.random() * 8)); } }) }); 

    JSFiddle https://jsfiddle.net/34xcopgg/

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

    My 6 Month Progress Report

    Posted: 03 Dec 2017 12:19 PM PST

    I figured this would be a good opportunity for beginners to see how much progress you can make in 6 months, and also a good opportunity for me to jot down my accomplishments.

    I have a bachelor's degree in chemical engineering. My freshman engineering course included learning a semester of C, Python, Labview, and Matlab. I work a full-time job and have been learning to code in my spare time.

    Month 0

    • Completed Udacity - Intro to Computer Science. You use Python and learn how languages work, variables, loops, functions, recursion by making a web-scraping program with multiple quizzes and homeworks.
    • Started Harvard CS50 on edX and made it through Lecture 5. I was originally content with just doing the one intro course, but then I saw that literally everyone recommended this course. I have a full write-up about CS50 here.

    Month 1

    • Started going to coding meetups. I was very nervous going to the first one, but shortly realized that everyone is like me. No one is judgmental, just eager to learn, meet people, and talk about programming.
    • Completed Harvard CS50 on edX
    • Set up laptop to dual boot linux ubuntu and windows 7 which was a mega-pain and took me a whole weekend because I messed up my partitions and couldn't boot anything for awhile. That was annoying/stressful.
    • Started 100 days of code to stay focused and make sure that I code every day.
    • Started The Odin Project because a lot of people recommended it as a next step after taking an intro course
    • Quit The Odin Project and started FreeCodeCamp because everyone said that Ruby was falling out of favor. The downside of FCC is that they push you towards doing all the projects on codepen. I read that it's a good idea to do projects in your own IDE/editor, so I did that and then uploaded to github.

    Month 2

    • Continued working through FreeCodeCamp.
    • Started writing "blogposts", but haven't actually posted them anywhere
    • Started Colt Steele's Web Developer Bootcamp because everyone recommended it. I would watch the videos while I was cooking, putting clothes away, etc.
    • Started reading "You Don't Know Javascript" because everyone recommended it as a supplement to FCC
    • Received FCC Front End Certification. The "checklist" layout of FCC and also completing the tasks in less time than they advertise was a big motivator for me and ultimately drove me to complete it so quickly.
    • Completed FB's React tutorial. I really wanted to fully understand React before I started building with it, but I realized that was taking too long, so I gave up on that.

    Month 3

    • Started and finished React projects on FCC
    • Contributed to the website of one of the meetups I had been attending. I used React + Meetup API to allow users to sign up for the next meetup from the meetup's website, codeclub.social
    • Started back end section of FCC. Learned Node, Express, MongoDB. Started API projects.

    Month 4

    • Completed FCC API Projects. Deviated a little bit on the last project. Made a node app that gets picture id from imgur.com/random and then scrapes the page to get the title of that photo and adds it to a mongo database. Separately, made an app that grabs the info from the database and outputs 20 random photos to the page.
    • Continued attending meetups
    • Contributed some more to codeclub.social. Added forum reply feature that allows users to reply to forums and upvote/downvote. It sounds pretty simple, but once you get going you realize that it's actually a lot of data that needs to be stored on the db. How does the app know whether or not you voted on the post? It keeps a record of all the users who voted, never really thought about it before.
    • Started and finished my first original full stack app, Yeggle. I frequently find myself looking for restaurants, etc. on yelp and then comparing with google maps results. This app does both side by side. My stack was node/express/react.
    • Read Clean Code by Robert C. Martin

    Month 5

    • Took a 2 week vacation
    • Started and completed my next project, StockIT. It is a game that grabs a random stock and picks a random date and starts trending it. You compete against a ML algorithm and the market by buying/selling as it's trending. There is a leaderboard that keeps track of points. My stack was python/flask/react/D3.

    Next, I plan to make a website that scrapes job posting info from various job boards and ranks them based on the languages/frameworks that you know and the weights that you assign to each one.

    Let me know if you have any questions; I'm happy to answer!

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

    [C++] Is it more expensive to check if something is zero, or to just add the zero to a sum?

    Posted: 03 Dec 2017 05:54 PM PST

    Whats more expensive in C++ for double/int?

    if (var > 0) sum += var; 

    or simply to add it:

    sum += var ? 

    Assuming I am doing millions of loops? My gut tells me its faster to just add the zero?

    EDIT: I should also specify that the data Im working is expected to be about 50% zeros.

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

    What are the best and most reputable coding bootcamps?

    Posted: 03 Dec 2017 08:01 PM PST

    Hi all.

    I'm looking into getting into programming. I've always wanted to work in the games industry, and wanted to attend a great coding bootcamp. What are your experiences at the ones you've attended? What are the best ones or worst ones from your experiences?

    Thanks again!

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

    [Java] Big-O and Algorithm Efficiency Analysis

    Posted: 03 Dec 2017 04:14 PM PST

    Hey guys I was just wondering if anyone could provide some resources for which I can actually practice analysis of algorithms? I get the concept of it but would like to practice it to make sure I'm doing it correctly and I can remember it better. I am currently a freshman in college so the only algorithms we've done is up to insertion sort. Thanks!

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

    Using PHP to get information from Python script on a remote server?

    Posted: 03 Dec 2017 11:44 PM PST

    Working on class project and on our class server we are using PHP to communicate with our DB. The problem is that we need to run a python script but we cant install the dependencies needed on the school server. So I have my python script on a remote server that's working perfectly.

    How would I go about using PHP on my local server to call that remote python script (with parameters) and return the JSON information in a PHP variable to use?

    I was thinking of creating a REST service with Python but I don't really have experience with this, if anyone has suggestions or advice, I'd really appreciate it.

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

    I'm trying to diplay the binary tree from the function my teacher gave us but I'm not sure if my function is correct.

    Posted: 03 Dec 2017 11:39 PM PST

    Alazizi Global Projects offer Website Designing Service

    Posted: 03 Dec 2017 11:31 PM PST

    Alazizi Global Projects is a best website development company in OMAN that helps you to realize you are most ambitious and complex enterprise website application development requirements. We focus on delivering end-to-end services and establishing long-term partnerships with our customers. Visit here: https://www.alaziziglobalprojects.com/

    submitted by /u/3ditonline
    [link] [comments]

    As a life science researcher, should I jump straight into R and python?

    Posted: 03 Dec 2017 11:31 PM PST

    Hey guys, I'm looking to learn some programming for data analysis and biostatistics. Should I start by picking up the basics and try the CS50 course on Edx or can I just go straight into the languages which are used for data analysis like python and R?

    Thanks!

    edit: I have no background in coding/programming at all

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

    Online Register Complaint against School Management

    Posted: 03 Dec 2017 11:20 PM PST

    Voicemycomplaint.com is an online Register Complaint against School Management where parents Register Complaints against school and parents can voice their complaints, concerns, and schools can listen, track and improve quality of education. Every business has some sort of complaints; they have to deal with them. Phone calls, Emails, website pages and social media all serve as a mechanism for submitting a form of complaint. Visit here http://voicemycomplaint.com

    submitted by /u/3ditonline
    [link] [comments]

    Learning basic C program from scratch using Visual Studio

    Posted: 03 Dec 2017 10:56 PM PST

    Hey guys, In most of the Asian countries specially the South Asian Sub continent, people are working hard to start a career in Information technology, Information technology has been rising in double percent in the last 10 years and people want to get into software development and support in this industry. The base for this knowing how computers work before you can start working on programming. Learning C programming is the best way to start your software development career even if you are looking to work as a part timer.

    The best way to start is with a basic hello world progam followed by learning some basic functionality: I have started a youtube series for learning basic C programs, follow link https://www.youtube.com/watch?v=O8zM482NmG4 for the first video.

    Please let me know how it looks, I use visual studio for building C programs.

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

    First defined here/multiple definition error C++

    Posted: 03 Dec 2017 10:56 PM PST

    So I'm quite certain that this should be an easy question but I've been working on it for too long and can't figure it out so I'll see if anyone else can figure out what I'm overlooking. From everything I've seen online, the root of my issue should be having too many #include .h but can't seem to figure out where I went wrong. Here are my files:

    //term.h

    #ifndef TERM_H

    #define TERM_H

    #include <string>

    class Term { /* code ... */


    //term.cpp

    #ifndef TERM_CPP

    #define TERM_CPP

    #include "term.h"

    #include <iostream>

    //code ...


    //SortingList.h (template file, no included .h files, I seriously doubt my problem is from here)


    //autocomplete.h

    #ifndef AUTOCOMPLETE_H

    #define AUTOCOMPLETE_H

    #include "term.h"

    #include "SortingList.h"

    //code....


    //autocomplete.cpp

    #ifndef AUTOCOMPLETE_CPP

    #define AUTOCOMPLETE_CPP

    #include "autocomplete.h"

    //code...


    //main.cpp

    #ifndef MAIN_CPP

    #define MAIN_CPP

    #include "autocomplete.h"

    #include <fstream>

    #include <sstream>

    //code...


    //the actual error message g++ -c autocomplete.cpp -o autocomplete.o g++ autocomplete.o term.o main.o SortingList.o -o CS216PA3 term.o: In function Term::Term()': term.cpp:(.text+0x0): multiple definition ofTerm::Term()' autocomplete.o:autocomplete.cpp:(.text+0x0): first defined here term.o: In function Term::Term()': term.cpp:(.text+0x0): multiple definition ofTerm::Term()' autocomplete.o:autocomplete.cpp:(.text+0x0): first defined here term.o: In function Term::Term(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)': term.cpp:(.text+0x5a): multiple definition ofTerm::Term(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)' autocomplete.o:autocomplete.cpp:(.text+0x5a): first defined here term.o: In function Term::Term(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)': term.cpp:(.text+0x5a): multiple definition ofTerm::Term(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)' autocomplete.o:autocomplete.cpp:(.text+0x5a): first defined here term.o: In function Term::compareByWeight(Term, Term)': term.cpp:(.text+0xea): multiple definition ofTerm::compareByWeight(Term, Term)' autocomplete.o:autocomplete.cpp:(.text+0xea): first defined here term.o: In function Term::compareByPrefix(Term, Term, int)': term.cpp:(.text+0x136): multiple definition ofTerm::compareByPrefix(Term, Term, int)' autocomplete.o:autocomplete.cpp:(.text+0x136): first defined here term.o: In function operator<(Term, Term)': term.cpp:(.text+0x25a): multiple definition ofoperator<(Term, Term)' autocomplete.o:autocomplete.cpp:(.text+0x25a): first defined here term.o: In function operator>(Term, Term)': term.cpp:(.text+0x28f): multiple definition ofoperator>(Term, Term)' autocomplete.o:autocomplete.cpp:(.text+0x28f): first defined here term.o: In function operator<<(std::ostream&, Term const&)': term.cpp:(.text+0x2c4): multiple definition ofoperator<<(std::ostream&, Term const&)'


    Is there anything that looks wrong with my header includes? Thanks

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

    Question about making a text log in C++ with SFML

    Posted: 03 Dec 2017 10:49 PM PST

    I've been programming in C++ for a couple years now; however, this is my first time doing actually graphical programming so I wanted outside opinions on this. I have a temporary solution but it's probably super inefficient.

    The Goal:

    I want to make a simple text log. When something happens I want the previous line of text to go up and then another line to replace where it was. You see this in any game action log or chat log in general. For this scenario lets say I hit the spacebar, a line of text appear, "you hit the space bar." I hit the space bar again: that text moves up 35 pixels, the newline, "you hit the space bar," is now at the bottom of the list of text.

    My probably bad solution:

    Current I have a text object with a string assigning text to that object.

    tx_feedback(st_feedback, f_font, 35) 

    When something happens I just add the endline character plus the line of text I want to add to that string. Then I update the text object.

    st_feedback += "/nnext line of text" tx_feedback.setString(st_feedback); 

    Lastly I increment the tx_feedback position to go up.

    tx_feedback.move(0, -FEEDBACK_HEIGHT); 

    To make sure the text doesn't go over a certain number of lines I will probably check for a number \n's and then after a number of \n's maybe delete the all text before the first \n. Alternatively I could just add to an int every time I add a line and once that int = 20 or so delete the first line of text from the strings by looking for the first \n.

    st_feedback = st_feedback.substr(st_feedback.find_first_of(" \n") + 1); 

    Question

    Overall this solution seems super inefficient, especially the end. Am I thinking to much into it? Is the solution fine? Any suggestions would be appreciated. Thank you for the responses.


    Edit: Added code for last idea

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

    What programming areas do you think are best for someone with a background in biology/health?

    Posted: 03 Dec 2017 10:33 PM PST

    So, I suppose this is two questions in one. I'm a young dentist working in California, get paid very well, but I don't think the job is for me (I call it being a glorified mechanic). I've always loved computers, and I think there's more potential of being able to leave a dent in this world being a programmer (possibilities are infinite..). I hope i'm not being totally delusional.

    What advice could you give regarding leaving a well-paying job to do something completely different? How hard is it to get a decent gig that pays the bills after self-teaching yourself programming for a couple months/year? I'm not sure if I'd have a deep regret if I choose this path, but it'd hurt me more not to try.

    Also, is there any specific area in programming where my medical/health knowledge could possibly be more useful? For example, I heard about bioinformatics (hardly know anything about it though..)? I'd like to build websites and such but not sure if there are other areas my knowledge in dentistry could be used for.

    Thank you all.

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

    Looking for a data structures/algorithms course similar to CS50 using C++

    Posted: 03 Dec 2017 10:16 PM PST

    I'm currently a sophomore pursuing a degree in computer science. I signed up for data structures this semester and had to drop the class a few weeks in cause I literally couldn't do the homeworks, even after attending lectures and labs.

    Some Background: I've only been coding for about 8 months, came in with zero prior experience and was a philosophy major before that. The two prerequisite classes I had to take before data structures really didn't prepare me for this class. The very first introductory course was in Python and I did well on that as it was pretty easy. The second course was taught in C++ for the first half and Java for the second half.

    I can do very simple freshman level exercises in all three languages but when it comes to more advanced stuff, I'm lost. A large part of the reason for this is I've also had pretty poor professors for my earlier courses and thus, a weak foundation. I'm looking to re-teach myself starting from the basics and going up to data structures before I take data structures again.

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

    Having trouble with UML diagrams [homework]

    Posted: 03 Dec 2017 10:15 PM PST

    I apologize if this is the wrong section. I'm currently doing an assignment for UML diagrams in a software engineering course. I just can't wrap my head around how to do this case:

    "Healthcare team first needs to discuss potential need for transitional care. If needed, a transitional care plan needs to be developed and the transition care service to be confirmed before the charging physician generates the discharge summary. The ward pharmacist will then need to confirm the discharge summary, or in the case of finding specific problems, send the discharge summary back to the charging physician for check and correction. After the discharge summary is confirmed, a nurse needs to run through the discharge checklist before finally discharge the patient."

    Here is my sequence diagram

    I would really appreciate the help. I've spent a lot of time trying to figure this out, but I just haven't had enough experience with UML.

    I'm especially having trouble with the situation if a "transitional care plan needs to be developed and the transition care service to be confirmed before the charging physician generates the discharge summary."

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

    [c++] sudoku solver, getting closer

    Posted: 03 Dec 2017 09:57 PM PST

    I'm trying to make my code to work in just the top left corner using a boolean function to eliminate non-zero numbers from the same num[] array. However, it looks like as my code is anything made false in not permanent. edit: made some changes works better but does not eliminate numbers properly

    https://stackoverflow.com/questions/47624594/trying-to-build-a-sudoku-solver-in-c

    Also, sorry for the link formatting takes me forever on here.

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

    Looking to learn React and Django for a project at work. Any suggested resources?

    Posted: 03 Dec 2017 03:59 PM PST

    My knowledge: Through work, I am proficient in Python but most of my work is strictly data science and statistics related. I use it on a daily basis to build models.

    I have played around with D3 but haven't built any serious projects with it. While I have some understanding of HTML, CSS, and JavaScript, web development as a whole is pretty foreign to me. Like I know what npm is, but I've never had a reason to use it until now.

    At work, I inherited a project built by an intern who has already left. My task is to repurpose that person's work. It's written using React with Django as a backend.

    Any thoughts on resources to get proficient in these technologies? I have also considered scrapping the React part of it and trying to do everything with python tools. Thoughts?

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

    How similar are the mvc frameworks to each other?

    Posted: 03 Dec 2017 09:51 PM PST

    I've looked at ruby on rails and django and they seem pretty similar. But I'm currently going through freecodecamp and I'm loving it. It teaches us nodejs and we will built a website using express frame work. So if I know express, would learning rails or even spring mvc afterwards be really complicated? or are they completely different? I've learned oop and data structures in java at my college, so I'd like to eventually learn spring mvc one day because I have a lot of experience in java.

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

    No comments:

    Post a Comment