• Breaking News

    Thursday, June 20, 2019

    Great Learn-To-Code Resource learn programming

    learn programming

    Great Learn-To-Code Resource learn programming


    Great Learn-To-Code Resource

    Posted: 19 Jun 2019 07:35 AM PDT

    Codewars is a great website I've come to love for coding practice. It's focused on solving problems that are created by other users - and encourages you to do research on how to solve it. I'd recommend signing up if you know some basics, but are looking for useful and practical challenges.

    It's free and supports many different languages.

    Thought I'd like to share!

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

    Intro to Data Structures: A high level overview of what they are and why we need them

    Posted: 19 Jun 2019 07:25 PM PDT

    I just solved the first three problems in EloquentJavascript and I feel like a million bucks

    Posted: 19 Jun 2019 10:35 PM PDT

    TL;DR Took me several hours, but I finally solved the problems on my own, without any kind of help or search engines. My first real taste of what it's like to code.

    I know it's not much, but this is the first time I actually put my head down and came up with a solution all on my own. Didn't even read the hints, or look anything up on the internet for any of the problems.

    The first one was fairly simple. I had a lot more trouble with the second, the one the author says they fail a lot of people applying for a job on. The third was the hardest, it must have taken me several hours to complete it.

    It's a very peculiar experience. I had no idea what I was doing, but as soon as I read the problems I walked around thinking on possible ways I could solve them with what I had just learned. Particularly with the third one, I went through like 7-8 different drafts, each time getting stuck on something and starting a new page to try and come up with a way to get past it. I ended up creating new ways of going about it with each new iteration, and finally I thought I had it, but then 3 more separate times I noticed the program wasn't working right when checking different values.

    Anyway, I did it eventually. Programming is fucking nuts, honestly.

    I know I'm still early in the book, but I plan to stick with it for as long as I can. I see a lot of people saying it's not good for beginners, but I hope if I read everything multiple times if necessary, I'll be able to solve whatever he gives me. Presumably he teaches all the tools you need for the job. Great book, either way, really recommend it.

    These here are the problems(you can also use the site to read/learn from the book, or even copy it to Kindle or whatever - also, for writing down and running the code for the exercises):

    http://eloquentjavascript.net/02_program_structure.html#i_rebKE3gdjV

    Edit: I'm also reading Turing's Vision by Chris Bernhardt right now as a more light kind of literature. It's about Turing's Universal Machines, his "On Computable Numbers, with an Application to the Entscheidungsproblem" paper, the math surrounding all of it, and things like that. It's a very interesting read, I'm learning stuff about Computer Science and its origins. I recommend it; it's a lot of fun. Please share any similar recommendations if you have them(I mean in terms of lighter reading surrounding CS).

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

    Went full out to learn programming for the money, and now i regret deeply

    Posted: 19 Jun 2019 12:33 PM PDT

    Short story: Had a good paying job in analytics, but was not satisfied with the pay, and everyone and their mom is learning programming, So I went in, all in.

    First coding bootcamp that focuses on Data Struct and Algorithm, then one semester at OMSCS (Took Software Development Process and Database course) , even quit my job since i thought the reason why i was not good at it was that "I needed to be fully devoted".......... No. I was not good at it since my motivation was not pure and i had zero passion for programming. I only had one driver, and that is money. and it came back bite my in the ass. Compared to the pain, the hypothetical salary bump was not worth it.

    now i am going back to analytics. It really had been painful and frustrating.

    The past year was filled with: frustration, tears, more tears, then self-blaming, then sunk cost, then more sunk cost, and the feeling of someone hitting my head with a rubber hammer. towards the end, it was no longer about learning, it was about investment, and downward spiral about extreme harsh self blaming and more.

    Warning: Dont go in for programming solely for the money. Dont go into programming because you want that FLAG halo, It really is not worth it.

    Compared to Java, Android,..n various frameworks, Leetcode problems.. Analytical tools never seemed so lovely.

    on a positive node, what did i learn in the past year:

    • some Data Struct & Algo knowledge ( BST, linked list, Hash table...) & a bit of OOD theory, taught using Java.
    • some front end knowledge, html, css, bootstrap, javascript, nodeJS. blah blah.
    • how weird, bizarre, and twisted some Leetcode questions can be. (to me it is pure torture) it makes me doubt the intentions of these questions.
    • how wide the knowledge gap i need to close in order to become a functioning software engineer ( hint: it's wide)
    • how much i dislike writing code, let alone writing code for a living, live and breath codes
    • that money alone is not enough of a drive for someone who has no interest in programming, not in the long run. i can't remember how many times that i just want to stay in bed all day and not think about it (learning programming)
    • Programmers are not gods, stop idolizing them, everyone has his/ her own interest and NOT everyone has to become a programmer to be considered successful, despite of how some media/ bootcamp propaganda may make you think
    • Rather than being that forever entry-level programmer hates his job, meanwhile dragging the entire team behind ( that's me in all group projects), and living in eternal fear of being PIPed, try to strengthen your knowledge in your own domain. Grass is not always greener on the other side. Especially when you do not know much about the other side, you tend to idealize when you dont know much
    • not all programmers make $250,000/yr. Many get paid $70,000 and stay that way, about how much an analyst get paid. and no one who hates programming can easily get a high paying job and hold it for long.
    • Try to write some small programs before a full switch. If you can't even get yourself interested for a small side project, you are probably not really interested.
    • Ask yourself, if programmers get paid the same as all other professions, say, nurses, teachers, analysts....etc, would you still pick it over other professions?
    • Programming is not the "get rich quick" ticket. The amount of money you had to put in, is negligible compared to the amount of efforts you had to put in.
    • Although i had multiple friends warning me ahead of time, I still made the decision of going all-in (aka, quitting, enrolling in OMSCS..blah blah) probably would made the same decision, since i was so conceited and blinded

    Other than trying to apply to the same level positions, now i try not to spend time to lament about the income I've lost in the past 5, 6 month. and Learned the lesson that sometimes, having the luxury to quit your job (i had family member who could support me) to switch career is a curse disguised as blessing. It is extremely painful to think about it, but all I can do at this time is to learn this harsh lesson and move on. I kept on telling myself that the experience had taught me something, but it is mainly just self-comforting. Maybe when i find a way to combine what I've learned in programming with Analytics I won't regret so much, but i am still looking for that perfect blend

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

    Experienced programmers of reddit, have you ever been in a stage in your career where every piece of code you write you feel it's either creating some technical debt or you are just over doing abstraction and all sorts of other principles?

    Posted: 19 Jun 2019 04:19 PM PDT

    So when you are writing code you can assume you'll eventually use this code for several platforms, so you can implement all sorts of dependency injection, all sorts of interfaces and abstract classes and spend countless hours there. Or you can take care of most of the obvious future changes and design your code that way just to suffice your current needs.

    I understand that as a crafty coder you need to find the sweet spot with this, but I can't seem to find it. Lately whatever I write either feel like I am creating a some technical debt here or I am overdoing this abstraction and inversion everywhere.

    Have you ever felt this way? How did you get out of this hole?

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

    Need some android side project ideas

    Posted: 19 Jun 2019 11:22 PM PDT

    I'm looking to get into making android apps this summer and I'm looking for some side projects to work on this summer. Anyone from beginner to intermediate would be appreciated thanks.

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

    Is Coding not for me?

    Posted: 19 Jun 2019 06:11 PM PDT

    I've tried multiple times to get into it (python to be exact). I've used highly recommended courses including Automate the boring Stuff with python. But It always feels like a chore and not something fun and exiting to learn. I haven't red the whole book, It's not that it is hard. So far it wasn't that hard to understand, but it bores me.

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

    What are the best resources to learn Android when I'm really good at Java already?

    Posted: 19 Jun 2019 11:12 PM PDT

    I have the OCAJP 8 certification and am really comfortable with Java and all it's concepts. It's my favourite language. I really love the Android platform and want to use my skills to make android apps as soon as possible. I have about 30 full-time free days and I am ready to dedicate a portion of my time even after that definitely.

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

    AITA?: coworker refuses to develop in existing stack

    Posted: 19 Jun 2019 12:25 PM PDT

    This is a bit of a rant, but please bear with me as I would really like to hear everyones opinion on this matter.

    I, and another developer, recently started at a company as the main developers on a number of projects. The company runs a number of services all written in PHP, that have been running for long before we arrived. While a bit old, they have no performance issues, and are stable and solid. We have been tasked with maintaining and updating them as needed, while also being tasked with developing new unrelated apps etc.

    Ive been a developer for quite a long time, and am fluent in a number of programming languages/platforms including: .Net, PHP, Go, RoR, React, Angular, etc. I generally try to use what is best for the situation, but am rather pragmatic and understand theres no reason to re-write something thats running fine just because you are biased towards a language.

    Where Im running into trouble is that my coworker vehemently dislikes PHP and at every chance, refuses to add new functionality to the projects we have written in it. Instead he has been standing up Go services on all of our servers, and building addons to our applications only in Go. Its gotten to the point where he is now deleting specs from our tickets, that stated the addition it is to be done in PHP, and then completing the task in Go.

    I cannot get him to give me any solid reason to use Go over the current stack, he generally just replies with 'Go is a superior language'. I cant disagree that Go has a lot of great things about it, but I dont believe that moving simple functions out of the current stack to a completely separate project/stack is good development etiquette. We now have multiple stacks, with multiple dependency chains, only to support something as simple as a CRON job script that runs every few minutes, which could easily have been done in the current code base.

    Its my thought that he ultimately believes he can slowly migrate each entire project over to Go on the sly, even though they are performing perfectly as-is and have no need to be re-written (no small task mind you, as some of these have years of dev behind them). He has been doing this for a while, and its caused a number of failures in services because he didnt account for everything the original code did, but I am unable to fix all of whats going on because my plate is incredibly full.

    Im happy to use newer languages/framworks for new projects, but I dont believe his course of action for the current projects we have is wise or beneficial to the company.

    I am wondering if any of you have experienced this, and what your thoughts on it are. Id love some feedback.

    Thank you

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

    How are pro developers soo organized and productive with their learnings

    Posted: 19 Jun 2019 08:01 PM PDT

    Hi,all just a random thought which happens to bother me a lot these days. With the sheer amount of learning a developer has to go daily alongside his usual work , how does a pro developer stay at the top of his learnings.

    **Though the question is quite short yet finding a great solution is really important to me .**

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

    How does one grasp the art of being able to see the flow from the git branches to the CI/CD pipeline to the overall cloud infrastructure?

    Posted: 19 Jun 2019 08:00 PM PDT

    For about 3 months I have been at my second job as a software developer II, which is mid level. However my first job didn't teach me that much so I'm struggling to see the flow I'm a new codebase as to what happens when my code gets committed, how and where is it deployed, how do the applications talk to each other in the private network, what triggers these events etc etc.

    I know the answer is to just look, but I've been getting very overwhelmed since I'm struggling to learn everything at once to be valuable.

    If there was a major production issue and I was responsible for fixing it then I think I would fail miserably, so I would like to chance the that.

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

    How do you get a string out of Django PostgreSQL ArrayField?

    Posted: 19 Jun 2019 11:07 PM PDT

    I'm trying to get a string out of an ArrayField in my database but it only prints by characters, not the full string.

    For example, the ArrayField is named words and in the database it shows {word1, word2, word3} so in the HTML I put {{ object.words.0 }} and { is rendered on the screen.

    I have imported ArrayField to my model and have django.contrib.postgres in my INSTALLED_APPS.

    This is what it looks like in my model:

    class WordArr(models.Model):

    words = ArrayField(models.CharField(max_length=200, null=True))

    How would I get it to render word1?

    Also, when editing the array in the database, I enter word1, word2, word3 but when I save and go back, it appears as {word1,word2,word3}.

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

    What is REST? What makes an app a "RESTful app"?

    Posted: 19 Jun 2019 11:05 PM PDT

    I read a bit about REST and RESTful services and I still don't understand what it is. Most explanations describe REST as a web service that gets CRUD HTTP requests (get, post, put, delete). But isn't that a description of the web since day 1?

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

    Don't know where to start

    Posted: 19 Jun 2019 10:57 PM PDT

    Hey guys, I'm currently a senior in Electrical Engineering at a university in Seattle and after I took a data structures and algorithms course I decided that I really want to become a software engineer. I know Object-Oriented programming in Java really well and that's about it. I'm not really sure what I should learn next to help me become a software engineer. I was thinking about making an Android app, but I see that something called RESTful APIs and AWS is very in demand (not really sure what this means). I also see that Javascript is also really in demand. I was trying to look at courses on Udemy but I can't really figure out what I should do over the summer. I have an internship at an aerospace company doing MATLAB work, but it's not object-oriented programming. What kinds of projects can I do or courses to look at to help me transition to software development? Thanks!

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

    Project idea suggestions?

    Posted: 19 Jun 2019 07:05 PM PDT

    I want to do a project using three.js and A-Frame to improve my skills, but I don't know what to make. Whenever I think about it, I end up thinking I could make anything and then I can't seem to narrow it down to one thing.

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

    My path towards a Master's degree

    Posted: 19 Jun 2019 03:17 PM PDT

    I'm a Brazilian civil engineer whom, 9 years ago, wanted to become a computer scientist, but was convinced by a couple people I should become an engineer instead. I initially wanted to major in Mechatronic Engineering and was accepted into a good university, but didn't had the financial means to move by myself to Brasilia at the time.I settled with civil enginnering in my home city and even though I considered dropping out halfway through, I persisted to the end and now am quite unhappy with this decision.

    This year, I was about to apply for a Japanese government scholarship called MEXT. I already had a research project and was somewhat confident I had a good chance at being accepted. My plan was going back to Japan next year for a master's program in materials science, since I already did an exchange there a couple years ago.

    I didn't really want to research this though. I love programming. I started learning how to program in C back when I was 12. It was so much fun trying to translate SNES roms to Portuguese, learning hexadecimal, creating games in RPG maker. Now I see how much I give weight to other people opinions. I didn't pursue my dream because people who were close to me said I shouldn't do it.

    But things have changed. I'll keep studying computer and data science. I like this, that's what I want to do.

    My interest sparked after automating some tasks with a VBA application for costs and budget administration at my current job. I also created some Python scripts for web scraping and really liked working with data in this way.I was at first a bit overwhelmed with where to start. We have OSSU, TeachYourselfCS and so many other study programs. I realized most of them require a strong math foundation. I've got some background in math, since on top of what I learned at my engineering course, I also was enrolled in a "scientific initiation" program for 2 years, where I studied Real Analysis, Linear Algebra, Abstract Algebra and Differential Geometry.It's easy to get lost with where to focus on when you are learning by yourself. My study plan is a mix of the OSSU Computer Science and the OSSU Data Science curriculum. I plan on doing the 4 Python courses on the former and the Core Programming, Core systems and Core Theory on the latter. On top of that I'll study the "An Introduction to Statistical Learning" textbook and doing the Andrew Ng Machine Learning course afterwards. My long term goal is doing Kaggle projects for fun.With that, I intend on learning CS fundamentals, but at the same also tackle a bit of Data Science. If next year or the other I find something relevant, I plan on pursuing a Master's Degree and changing carreer.

    I started studying on the beginning of May. I'm currently on Week 7 of CS50, Week 3 of How to Code: Simple Data and just started the Algorithms: Design and Analysis, Part I Stanford course.

    What is my purpose with this post? Honestly, I don't know, I think I'm just really excited with finally shifting my attention to something I truly care about and wanted to share it with someone.

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

    [Pseudo code] Can someone help walk me through this pseudo code's logic?

    Posted: 19 Jun 2019 07:01 PM PDT

    I'm trying to spruce up my programming skills by answering some beginner-level programming questions.

    Here is one question I came across:

    What is the value of x?

    int x = 1;

    do {

    x += 10;

    } while(false);

    The question gives me four choices:

    a. 11

    b. 1

    c. 10

    d. 9

    My original guess to the answer was c. 10, because I thought the while function will stop at 10, but I realized that x starts at 1, so then my second guess would be a. 11.

    At any rate, I'm confused and I need someone to help me walk through the logic.

    Can someone explain what the answer is and how I may understand the logic?

    Also, I'm assuming it's pseudo-code or at the very least C-like syntax. I assumed it was C and I then tried to find an online C compiler to run the code, but I got compiler exit status 1. I'm not too sure if that's even the answer or if it's just an error code.

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

    How to restrict access to field setters of an object? Would achieving this with inheritance would be a bad choice?

    Posted: 19 Jun 2019 03:10 PM PDT

    Hi everyone, first time posting, hope this is okay to post a question I am struggling with. I have already posted it on stackoverflow but things weren't very clear to me, so I am asking here. Thanks for your input in advance.

    I have some business data objects that are created by the underlying services (say the data repository). These objects are created step by step. i.e (Step one only finds the image object from google, step two retrieves metadata about the image, step three downloads it to disk).

    These same objects will be rendered in UI as they are being built. So the UI doesn't need to know anything about the setters and shouldn't have access to it.

    But the services who are creating the instance, needs to have access to the setters. Please note that this model will be used from other packages so making setters package private is not a solution.

    Here is the requirement in terms of code:

    Image model:

    class Image { private String src; public String getSrc() { return field; } public void setSrc(String src) { return src; } } 

    Service model:

    interface IService { Image get(...); Image processMore(Image i); } 

    UI/client code:

    Image i = service.get(params); render(i); i = service.processMore(i); render(i); i.setSrc(null); //This is the problem. Client should not have access to this method. 

    Possible solutions:Solution 1: Interfacing

    public interface IImage { String getSrc(); } interface IService { IImage get(...); IImage processMore(Image i); } IImage i = service.get(params); render(i); i = service.processMore(i); //Casting IImage to Image - this cast can easily fail and no way to know IImage is always an Image render(i); 

    Draw back: Casting issue as I have commented. Also a lot of boilerplate code will have to be written, for each object. This will get very complicated when Image model is extended.

    Solution 2: Builder patternAgain a lot of boilerplate code. But strictly speaking, Builder pattern does not fit here as the object is built in steps and we'll have to call getSrc() on a builder class, which probably violates something in the books.

    Solution 3: Inheritance

    public abstract class Image { protected String src; protected Image() {} //Ensure this class instance is never created public String getSrc() { return field; } protected void setSrc(String src) { return src; } public static class Buildable extends Image { protected String src; public Buildable() { super(); } @Override public void setSrc(String src) { return src; } } } interface IService { Image get(...); Image processMore(Image.Buildable i); } Image i = service.get(params); render(i); i = service.processMore(i); //Casting Image to Image.Buildable - as Image constructor is protected and Image.Builder is public, only way to create Image is creating Image.Buildable and hence this cast should never fail. render(i); 

    So as a beginner who is learning SOLID principal, my question is,

    1. Does this inheritance model violates SOLID (or other clean code guidelines)? If so how it should be done?
    submitted by /u/_RootZero
    [link] [comments]

    Infinite loop in text-based adventure game - C++

    Posted: 19 Jun 2019 10:17 PM PDT

    Hey, everyone, it's me again. So I posted earlier today, but it looked like my error was under control, so I deleted my post.

    Apparently, the error was not, in fact, under control.

    So I made a text-based adventure game where the user invents a fictional superhero character, and then that character joins the Avengers to help defeat Thanos. (Not the best idea, I know, but I'll work on it.)

    Here's my code:

    Character.h

    #pragma once #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <cctype> using std::cin; using std::cout; using std::string; using std::istream; using std::ifstream; using std::ostream; using std::ofstream; #ifndef CHARACTER_H #define CHARACTER_H class Character { public: Character(); // default constructor void set_age(double age_person); // sets age of character to 'age_person' double get_age(); // returns character's age void set_birthday(string birth_day); // sets birthday, must be input in 'MMDDYYYY' format string get_birthday(); // returns birthday void gain_points(int p); // character gains p amt of points int get_points(); // return character's points void set_gender(string g); // sets gender string get_gender(); // returns gender // also write a function to set the string arrays // will let users input the elements they want // no inputs needed bc we already have all the arrays as private members void set_array(); void set_firstname(string first_name); void set_lastname(string last_name); string get_firstname(); string get_lastname(); void set_alter_ego(string alterego); string get_alter_ego(); // I won't write a destructor b/c the compiler will likely provide one private: // the character's name string firstname, lastname, gender, alter_ego; // personality traits, abilities, physical traits, origin story string personality_traits[5], abilities[5], origin_story[5], physical_traits[5]; // other stuff double age; // character's age string birthday; // input in MM/DD/YYY format int points; // points character earns as they go thru game }; 
    

    No comments:

    Post a Comment