Live data from Hacker News

Ask HN: I've learned a programming language – how do I solve problems with code?

news.ycombinator.com

61–70 of 112 posts

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#61
Pick a problem you need a solution to . . .

a todo list app shopping list app blog/cms simple crm tracking lego minifigures in your collection

Basically pick anything you would use, then dive in and start developing it.

You'll be creating a basic CRUD app initially but you can expand and improve on that as you go/learn more skills.

I'm not sure js/node is the best starting point but use what you know. Typically I recommend learning

html/css/js/jquery/php/mysql/(rails or laravel) then top it off with angular.

I recommend rails or laravel.

railscast.com or laracasts.com have lots of great tuts.

Coding something up from scratch before diving in to a framework is probably a good idea. The first time a started learning rails it was tough to follow what was going on behind the scenes. But after creating a few apps from scratch in php/mysql rails was a lot easier to learn.

Good luck, have fun.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#62
Just DO! ;) That's why it is named "learning by doing".

No offence: Programming is not worth a dime if you don't have a problem to solve yourself. And either you are the kind of lemming who sits and waits that someone presents you a problem you should solve for him or her or you are as creative to create your own problems as creating problems is a very creative process.

For example take a website. Let's suppose you are using a popular blog system. Then... what? Well you see a spectacular gallery on a site X. You want to have that on your site too. Then sit down, take notes and think over what you need. All you write down is more or less your algorithm (logic). You could do it with database support or without, you could use a JS lightbox or you could do your own. I remember doing my first coding. The example in the book was a basic text editor. So what did I do? I expanded the thing, so I added feature after feature I found very useful. :)

Another example with your blog and an API? Let's say you would like to visualise your data. Get the proper js library and try to connect it with your data. How could you do it? You could use csv files with a cloud space like Dropbox or Google Drive.

At least the problem is what you think of it. There are a lot of problems or none. Noone could tell you what "your" problems should be.

If you get past JS you could use Rails, Python, PHP and code your very own content management system (recurring to Codecademy and CodeSchool's content). Or you could write an app, which aggregates all the news channels you like by storing all rss feed entries, all tweets all Facebook postings by the channels you chose.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#63

Hi bnb, I started programming around 20 years ago - self taught and experiencing the same problems as you in the early beginnings. I made mistakes when I started - jumping around between languages - thinking I couldn't grasp something - jumping from one tutorial to another, and another, and another - I wish I started learning algorithms & data structures earlier - I wish I took time to dive deep instead of rushing to…

This is definitely speaking to me. I started with .NET almost a year ago and I said I'm going to learn everything about the framework inside and out. I said it was my goal to be employed as a C# developer and love what I do. .. I haven't touched C# in almost 3 months. I got interested in Android which led to Java which led to Spring which led to Grails then I said "Hey whats Node JS?" then Ember and Angular .. and one book after the next. I test drive a framework to see what it can do and I have spent about a month digging into about 10 different frameworks and do you know what I discovered?

They all do the same fucking thing. So with that I feel on one level I like being exposed to different languages on my personal time (Perl programmer/Sys Admin professionally) and I thought that this was really helping my programming skills in general. But now I'm wondering if I've caused more trouble than good. I know I have to pick a technology and literally stick with it. I have to see what I'm most passionate about. I am thankful for everything I have observed but its time to publish some apps. I feel like I do a lot of studying and have nothing to show for it. Rails, ASP.NET MVC, Spring MVC, and Grails all do the same thing. It just depends on what eco system and what language you're most comfortable with and of course your work environment. All of this for me is personal exploration. At work we have a LAMP environment and our web apps are written in PHP. I'm just there to build my resume. I can't stand PHP and am not passionate about the technology we work with. So yeah. Lost in a sea of code.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#64
A lot of explanations here about how other people learned to use programming as a tool for themselves, but everybody is different. One person's analogy for using code might not work for you. You have to discover what works for you on your own. Sure, keep the other analogies and things in mind, and ask yourself if you can relate, as you progress through your own journey. Everything is relative though, and your experiences are what make you unique and valuable to the community as a whole. Maybe you're the next Bob Ross of JavaScript - we want you to be. So, don't aim to mimic somebody else's experiences because that'd just be an injustice and it'd also take away from what makes this journey so rewarding. I suggest just visualizing some end goal of yours. You want to make a website that offers some kind of service of something? Visualize that site and break it down into chunks. Finally, dive in head first. Just start coding on it. Don't give a single thought to whether or not it's as good as somebody else's code. Don't worry about if it's the best it could be, yet. All you need to do is connect the dots, mentally, and play with the legos. Focus on hacking together something that, in the end, resembles that mental picture you had. Once you're there, a large portion of your original question will have pretty much been answered - you'll have use code to solve some problem. All that remains is to figure out how to improve. That's all any of us are doing - trying to improve.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#65
The question you are asking is like"How do I build a house?" It's too broad. Instead ask, "how do I pour a foundation?" or "How do I frame a wall?" Figure out how to setup a database. Figure out how to execute queries between database and application. Figure out how to write a login form. Build up from there, one small piece at a time.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#66
Pike's 5th Rule: Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. - Rob Pike, Notes on C Programming (1989) via https://github.com/globalcitizen/taoup

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#67
I remember exactly when I was at this point. I had a decent grasp of Java, but I couldn't build anything that I wanted to use. The way to learn is to build something you want, or something you'd like to show off. For me it was an Android app. I knew there was Java involved, but it taught me all of the things I could never learn from just reading a book (user interactions, getting data off the network, etc). Building my first Android app and my first Ruby on Rails website showed me 'real' programming. The funny thing is it turns out that stuff is all boilerplate rarely involves the fancy algorithms you learn first, but it's what makes real products.

Since you know JavaScript, go build a mobile app with Phonegap. You'll get a really great rush when you see your first app pop up on an iPhone or an Android phone. You'll naturally want to iterate and improve, and that process will make you learn.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#68
Take the MIT Intro to CS with Python course. It's an introduction to using computational methods to solving problems. Then take the second course.

Then find problems to solve. Lots of them.

Find a mentor.

I had my 15 year old son take these courses (with me acting as tutor). There is no way to describe the transition he made. From wasting his time learning a bit about a language here and a bit about another language there to focusing on one, learning how to solve a range of problems, learning about data structures and more. He cam out of that swinging and capable of approaching real problems (still with a need for me to coach, but a huge step forward).

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#69
No no, don't work on petty real problems just yet, because you have only finished half of the programming training, specifically the bottom half that is the lowly Javascript(or PHP).

Now you need to spend 3 months on a lisp language(Clojure, Racket, SBCL, Arc, doesn't matter), then another 3 months on Haskell, the King among Kings of programming languages, yet another 3 months on the almighty Emacs, and finally 3 months on Vim, so you can use the Evil plugin with Emacs. Only after all these, you can confidently and proudly start learning PHP, work on a Rails project.

You will thank me every time in the future when you visit Hacker News, Reddit or StackOverflow, every time you walk into a meetup, or join in a water cooler conversation.

Re: Ask HN: I've learned a programming language – how do I solve problems with code?

#70

Excellent question for a Friday. Coding is like welding, how do you find two pieces of metal that need to be joined? Generally the answer is visualize something that could exist, but does not exist, and then fill in the parts that need to be there for it to exist. What you need at this point are a series of assignments which are self-contained problems with known solutions. The assignment 'create a web server that di…

Like said, I normally buy a domain and setup an idea and work on it. In the process I learn a lot.
Post reply on HN