TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask YC: Learning to hack...

29 pointsby rjettabout 17 years ago
One of the common pieces of advice given by the hackers on this site to the non-hackers is to "learn how to hack." In the past few weeks, I have come to the realization that I, too, would like to "learn how to hack." Here's the problem: Not having an extensive technical background, this piece of advice seems to be quite vague. With which languages should one start in order to learn to hack? I sent a similar version of this question to PG about a month back and he referred me to the creators of Appjet, a YC startup he said was working on this very problem. After looking at the site and receiving an email from one of the founders, the answer I gleaned was to start with learning Javascript. I would like to know from this community whether I'm on the right track to "learning to hack."

29 comments

tdavisabout 17 years ago
Saying you want to learn how to hack is incredibly ambiguous and in the strictest sense of the word pretty difficult to achieve. A "hack" is essentially a clever solution to a programming problem or a solution to a problem that's outside the norm and requires extensive domain knowledge. Judging by the comments it seems the term has been diluted to pretty much be a synonym with "programming" or "coding."<p>If you want to learn how to code, the first question is what do you want to code? Do you want to make websites? Create PC games? Create mathematical algorithms? Use math to create images... the possibilities are endless. Learning Javascript would be useful if you want to create websites, obviously, but outside of that it's not a general enough language with enough (any, really) general applications to be a good place to start. It's essentially an odd combination of Object Orientation and Functional programming which is cool in that it introduces you partially to two separate kinds of languages simultaneously. It can also be confusing for the same reason.<p>If you want...<p>A multi-purpose language that will let you rapidly prototype programs and is both extremely readable, easy to understand, and has modules for just about everything: <i>Python</i><p>A language that forces you to learn about more fundamentals of programming and doesn't keep you from royally screwing up: <i>C</i><p>A language with extremely high-level features, infinite flexibility and power: <i>Lisp</i><p>A language that lets you create extremely stable applications built for concurrency: <i>Erlang</i><p>A strictly web-only language with a huge supported base in the online hosting business and about 1,000 frameworks: <i>PHP</i><p>The latest craze in web development: <i>Ruby</i> with obligatory framework <i>Rails</i><p>---------<p>I could go on and on and on... hopefully one of these descriptions scratches your itch. Keep in mind these are merely suggestions and there are many other languages that would fill any of the descriptions I gave.<p>EDIT: I am a firm believer that regardless of your end goals to really learn programming one must start at the beginning. Learn about computer architecture, how CPUs and memory work; learn the pain of programming Assembly and managing memory bit by bit even though you'll never do it again. Then move onto C; learn how even the most fundamental of abstractions made programming possible for lesser mortals. Keep moving forward and come to comprehend that features such as garbage collection, while taken for granted, are in reality really freaking awesome and will help you keep your hair longer.<p>Move up the ladder, rung by rung, until you have the confidence and knowledge to use a language that is highly abstracted and has all the "batteries included," like Python. At this point the language/interpreter/compiler will do most of the work for you but you'll have the experience necessary to understand, more or less, what's going on behind the scenes. From there, if you want to specialize, choose a language created for the domain that interests you; PHP, Erlang, Matlab, etc.<p>A brief 5/10/20 years later, you're a hacker. Nobody will give you a diploma, though.
评论 #190873 未加载
schtogabout 17 years ago
learning html and javascript could be a good place to start since you can make things right away with those.<p>i think that is very important when you start, to get instant feedback, making stuff is fun :)<p>for this reason i would recommend python as your first language. it is very highlanguage and have extensive libraries. it has clear sparse syntax and is very easy to write and read.<p>but that doesnt mean it is a weak language, ont he contrary it is a very powerful language that is used by a lot of big companies and small startups.<p>so not only is it a good language to start with but it is also something you will have great use for in general as a skilled hacker.<p>while paul graham and a lot of others rave about LISP(right fully, its a powerful, flexible language with some very special features) i wouldnt start with it. it lacks a standard and you start working on a higher level of abstraction right away, there is not a lot of libraries that you can just install and start having fun with right away as you can with python. i definitely think you should learn it later on but not at the start.<p>with python you can add the pygame library and start making simple games right away, it is very easy. you can write webapps with webpy/django without much knowledge needed.<p>then as you evolve you should pick up something like the art of programming(or a similar book that has code in a language you know) and learn about all basic algorhitms and datastructures. if you want to be a serious hacker you need to know the theory.<p>python however lets you create cool things right away without knowing that much.<p>while this is a rant for python it is not fanboyish, i just think python is very suited for programmers of all skillevels. there was an article on here some days ago about pythons suitability as a beginners language.<p>there are other options obviously, ruby for example his fairly similar to python in a lot of aspects but when python tries to keep things simple(there should preferrably be one obvious way to do things) rubys philosophy is there is more than one way to do it.<p>you could ofc learn java(java and javascript only have the name in common) which is wide-used language that you will run into sooner or later anyway. on this board youll probably find that it often gets critisized for being a language for average programmers though. it is fairly verbose and in some peoples opinion too objectoriented and dont offer any options.<p>the downside with python and ruby are that they can be pretty slow but that isnt an issue for most applicatiosn and certainly not for the apps youll write a s a beginner.<p>ruby also has a very popular webframework called rails(ruby on rails).<p>c/C++ are probably the fastest(executionwise, not developmentspeed) and are also good to learn but are a little more difficult to start with and c is fairly low-level. good to know but wouldnt recommend it to start with. devc++ is a good development environment if you do though.
评论 #190739 未加载
评论 #190702 未加载
评论 #190742 未加载
hooandeabout 17 years ago
Your best bet is to get a project and make something. It doesn't matter what the project is or if anyone besides you will ever use it.<p>There will obviously be a lot of debate (and possibly some downmodding) over this, but I would say that the language doesn't matter. I think the important part will be finding resources that you think will be helpful for you (a book, a tutorial you find on google, a friend who knows programming). In your case you want to spend as much time coding and as little time on set up and administration as possible.<p>Figure out how to do something easy, then see if you can start tweaking it and adding small things. You'll be a regular hacker in no time
epi0Bauquabout 17 years ago
<a href="http://news.ycombinator.com/item?id=149482" rel="nofollow">http://news.ycombinator.com/item?id=149482</a><p><a href="http://news.ycombinator.com/item?id=127952" rel="nofollow">http://news.ycombinator.com/item?id=127952</a><p><a href="http://news.ycombinator.com/item?id=123903" rel="nofollow">http://news.ycombinator.com/item?id=123903</a><p><a href="http://news.ycombinator.com/item?id=90782" rel="nofollow">http://news.ycombinator.com/item?id=90782</a>
评论 #190720 未加载
dusklightabout 17 years ago
One thing I would like to point out, that you probably won't like to hear ..<p>If your purpose is to learn how to "hack" to the point where you can make real webapps, you should be aware of two things.<p>1. You will never become a good hacker if you are only doing it for the money or for the recognition. You have to be able to love the code for the sake of the code itself. You have to be able to see the beauty in the code. Otherwise you will never really understand it. It is the difference between being able to copy a poem out of a book and being able to write a new poem. 2. Assuming you are a true genius, the process will still take you many years. Working hard will not be enough. You will have to learn how to work smart to learn all the stuff you will need to know.<p>If your purpose is to understand hacking to the point where you can better understand technical people so that you can work with them better .. that is a much more realistic and reachable goal. For that I would recommend you start with Ruby or Python and try to make a full-scale production webapp, and from that experience you will learn a lot that will explain how a technical person thinks.
评论 #191428 未加载
whitenabout 17 years ago
I think I understand the underlying reasoning behind the question. If like me, you have read a lot of the posts on this site, and the essays of Mr Graham, and have a desire to somehow start a start-up, or become your own boss etc., you search for ways to achieve this/these goals.<p>Most of the advice is fairly general, and I was often left with the feeling that many people just repeat the mantra: 'learn how to hack', 'do something you want, and users will like' etc etc. All good advice I may say, but nothing too concrete on how you actually start!<p>As hackers, most people will say: "you need to code, and business people, although relevant aren't required straight away."<p>I sort of agree and disagree. What does not work though is doing nothing, or procrastinating(in the wrong areas).<p>For me, I decided to at least do SOMETHING. I came from a systems engineering background (read:good Microsoft/Cisco techie, and reasonable sales/presentation sort of guy) - not a hacker though.<p>So, I decided to attempt to learn Java about a year or two ago. I have done OK with this, but unless you use a language in anger most days, you don't get very far. My latest attempt is Python. I like Core Python Programming 2nd edition by Wesley J. Chun.<p>What I guess I am trying to say is, you need to work out where you want to be (successful business), and take small steps towards it. That maybe learning business stuff, and it maybe learning to hack. Whatever. Just do something that is a step towards where you want to be, and continually re-evaluate how it's going.<p>Good luck.
quanabout 17 years ago
Learning the essence of programming is more important than learning a specific language, once you master one of them it's very easy to pick up the rest. So I'd pick an easy one such as PHP and use online resources like w3schools.com to get me started.<p>Also, I find it very effective to learn by looking at examples on line first and create similar problems to solve. That way, my head remain active to think through the problem solving process. It also helps memorizing the syntax because you see the purpose of the code instead of just passively taking it all in.
natriusabout 17 years ago
You are trying to learn how to program, but many people are suggesting that you should pick a language based on what you plan on doing with the language. I don't think that should be your primary consideration. The primary consideration should be the quality of introductory material in that language. I think you'll find most material to be in Java, followed by C++ and Python.<p>Assuming you want to do web programming, I would suggest you start with Python as your first language. It has quality introductory material[1] and is widely used for web programming, as well as many other tasks. There is less complicated syntax that you have to ignore while learning how to program compared to Java and C++, and is generally regarded as a Better Language. Even if you weren't planning on doing web programming, Python would still be my suggestion for a first language. I'd only suggest anything different if your main concern was getting a generic programming job, in which case Java would be a better idea.<p>I feel like JavaScript would be a particularly poor choice as a first language since most introductory JavaScript material isn't trying to teach how to <i>program</i>; it typically teaches how to manipulate web pages. As a new programmer yourself, it will be harder to judge what texts you should pick from those that are available.<p>If you start out trying to learn how to program web applications instead of learning how to program in general, you'll be selling yourself short. Your code will be worse and it will be more difficult to figure out how to solve atypical problems that a web framework hasn't solved for you. Don't do it.<p>[1] Or so I hear. I haven't read introductory material in years, and then it was C++. Try <i>How to Think Like a (Python) Programmer</i>: <a href="http://www.greenteapress.com/thinkpython/" rel="nofollow">http://www.greenteapress.com/thinkpython/</a>
geebeeabout 17 years ago
I've always liked Eric Raymond's advice:<p><a href="http://www.catb.org/~esr/faqs/hacker-howto.html#skills1" rel="nofollow">http://www.catb.org/~esr/faqs/hacker-howto.html#skills1</a><p>BTW, it's notable that Eric used to recommend Java as a second programming language, and that he no longer does.<p>The only thing I'd add to his recommendations is a pitch for Ruby. I think it's a really good first language.
chwolfeabout 17 years ago
Teach Yourself Programming In Ten Years <a href="http://www.norvig.com/21-days.html" rel="nofollow">http://www.norvig.com/21-days.html</a>
horia314about 17 years ago
you should find some small thing you need to do for yourself : for example searching through all the images on your computer, and seeing which one is of a particular format (jpg, bmp for example) or which one was created/modified in the last couple of days. only then should you approach learning a programming language (i recommend python for starters, because it's sweet and has a lot of libraries, letting you concentrate on what you want to do instead on arcane problems) and then learning the techniques necessary to solve your problem (you'll see that most tasks you can solve programaticaly have a certain template).<p>It's important to start with a real task, and not only do the simple training programs you'll find in every manual/tutorial. I can't stress enough the difference between grasping a concept and actually being able to apply it in the field.<p>Second, after you learn your first language, don't ever think of sticking only to it. Learn your second, learn your third and your Nth language and never stop learning them. Sure, most of them are similar (python is like ruby, perl, lisp, c is like c++,c#,java) but there are some oddballs like prolog and haskell which will make you a better programmer just by knowing that they exist and what they're about). Thus you'll have a tool for every job.<p>Also, after a while, learn assembler (x86) and some hardware theory (how a computer works, what's in a CPU or a GPU etc.).<p>Finnaly, have fun! Don't feel pressured to know anything you don't need or don't think will make you a better programmer. Don't learn Java and it's assorted libraries because every job wants you to know it. Don't learn LISP because the cool kids are doing it, and don't write programs you won't use.
michael_dorfmanabout 17 years ago
The nice thing about the Javascript recommendation is that by using the "View Source" option in your browser, you can get lots of real-world examples to read. Reading code is a great way to learn how to hack (and the way we used to do it, back in the day, when access to computers was very limited).<p>I'd suggest the following: find a web page that interests you, view the source, and try to understand what the source code is doing. Start with getting a vague overview, and keep drilling down into each layer of abstraction, asking questions repeatedly, until you truly grok every line.<p>When you can do that, you'll be well on your way.
评论 #190645 未加载
aleclairabout 17 years ago
I suggest _why's lovely Hackety Hack (<a href="http://hacketyhack.net" rel="nofollow">http://hacketyhack.net</a>)<p>Reasons why H-ety-H is a good choice: 1. Ruby - Ruby is a beautiful, easy to learn, modern language that's both powerful and easy for beginners. 2. Hand-Holding - It walks you through all of the interactive examples 3. Community - Hackey Hack encourages users to share their programs with others<p>Besides, if eigth graders can do it, so can you!
blogimusabout 17 years ago
What is it that you want to hack? What do you want to make?<p>For me, I was a kid and I started hacking basic on an Atari 400 with a whopping 2k of ram. I was trying to make a dungeon crawl game. I learned about variables, conditionals and looping. Then I learned about I/O.<p>Your environment is, of course, vastly different than mine was, but the process is the same.
simplegeekabout 17 years ago
Learn JavaScript, Python and PHP. It will take time but eventually it will pay off. Moreover, once you learn/master any language please always pay attention to everything that comes with the package. In linguistics, the ultimate goal is to become proficient enough to start <i>thinking</i> in a language. Being a non-native speaker, I know how hard it's for me to start thinking in French and English (despite knowing a few things). Develop a sense of dissatisfaction. Always find ways to optimize things. Build something that lies between "Hmmm, I guess I cannot build it" and "Well, I guess I can do it given I spend time doing it" (read: Psychology of Flow). Do a product, albeit small. I've observed that you hack with altogether a different mindset when you're developing a product with a belief that it can some day pay you back somehow. And please once you're an expert JavaScript programmer always capitalize the S in JavaScript ;)
maxkleinabout 17 years ago
Frankly, I would advice against learning Javascript. When you try to interact with HTML, it's very inconsistent, and it's difficult for you to get a grasp of the rules and what is supposed to happen where.<p>I would suggest starting with Java. Java is a modern language, you can get a free compiler and IDE, there are tons of excellent books, and you will learn all the concepts of object oriented programming without having to deal with the 'interesting' parts of the machine.<p>Set yourself a goal, for example to create a GUI app that organises your MP3s or so. Then work on that as your way of learning Java.<p>After you know Java, the other imperative languages are mostly about syntax. There are no real new concepts to learn.<p>Now, I do not use Java personally. I use C++, and I started with VB. It's useful to learn C++ early, but only attempt this if you are a dedicated and patient person.
gtaniabout 17 years ago
i hadn't noticed Eric Raymond keeps updating "How to become a Hacker". No mention of the in-vogue ruby, haskell, erlang, scala, scheme, smalltalk, OCAML, etc, but good stuff.<p><a href="http://www.catb.org/~esr/faqs/hacker-howto.html" rel="nofollow">http://www.catb.org/~esr/faqs/hacker-howto.html</a>
frederiksenabout 17 years ago
Like schtog said, I think python is a great choice. You can easily write programs that actually _do_ things without having to get too deep into the ugly details.<p>Most of all, write programs that are fun. For my third year software engineering class we wrote a 3D implementation of bomberman. It was a blast to write and I still hack on it now and then to add crazy over the top powerups.<p>Also, it looks like you've found a good place to get your news from. Being aware of cool new projects / languages / ideas is always a good thing.
Herringabout 17 years ago
Adding to what everyone else said, you need a framework for the programming. These are skillsets &#38; you can only pick them up if you practice extensively. You need something to practice at.<p>Install ubuntu 8.04 &#38; explore the add/remove apps. Install netbeans &#38; write a hello world app. Install quanta &#38; edit some saved web pages. Get mediawiki working &#38; use it for notes. Install a simple mediawiki extension. Edit it, or write your own.
dc2k08about 17 years ago
this is a good thread for me to read. i have found it difficult just to realize what i need to know to start working on projects that i have in mind. i have so far been working with html css and some java script to design static web-sites but am really unsure as to where to go to make a simple web-app with a database to store user information that produces a dhtml page.<p>i was thinking of picking up a mysql book for dummies yesterday but decided to put it off till i finish the one on javascript. though even then im not sure if that's what i need to know or if its the right choice<p>with so much buzz about rails everywhere i was contemplating picking up something on that but then there is python too, and i havent a clue what exactly they do. then there is the new google app engine. will that help me? i signed up, but am yet to fully delve into exactly what it does for a developer. i guess there is alot of ways to cook an egg. but this forum really helps alot.
xiriumabout 17 years ago
See <a href="http://news.ycombinator.com/item?id=135494" rel="nofollow">http://news.ycombinator.com/item?id=135494</a> for a previous discussion on this topic and <a href="http://news.ycombinator.com/item?id=135575" rel="nofollow">http://news.ycombinator.com/item?id=135575</a> for my previous recommendation.
brentrabout 17 years ago
It really depends on the domain you want to work in. Do you want to create a web service? Do you want to create systems? Do you want to create a tech start-up? I assume the answer to the last is yes, but even then it is not necessary for every founder to be a hacker, but it certainly does help.
edw519about 17 years ago
For all intents and purposes, you will need to learn (at least) 2 technologies, one for the client and one for the server.<p>On the client, you have 2 primary choices: HTML,CSS, &#38; Javascript or Flash/Actionscript. I would definitely opt for HTML,CSS, &#38; Javascript because it's open source and it's everywhere.<p>On the server, you have many more choices for languages and databases. One of those languages is Javascript, although not too many people use it on the server.<p>I think you're on exactly the right track. Learn how to build web pages first with HTML, CSS, and Javascript. Then when you're ready to "connect" to the server, ask the next question, "What is the best language/data base to use on the server." But stand back because sparks may fly from your terminal screen as we hackers fight with each other trying to answer that one :)<p>Good luck.
评论 #190615 未加载
xenoterracideabout 17 years ago
as a novice, but language bigot it depends a lot on what you want to make.<p>Low level, kernel, command line C is king. Python for slightly slower but faster coding.<p>For an GUI program use C++ (qt is a good toolkit).<p>For Web Pages learn html/css and then add javascript. After that I would say mysql (or postgresql. I like postgresql better) and php. you can trade php for perl/python/ruby if you like.<p>Web means learning a lot of languages but to me seems the easiest.
iamelgringoabout 17 years ago
<a href="http://iamelgringo.blogspot.com/2008/05/teach-yourself-you-to-hack-in-6-9.html" rel="nofollow">http://iamelgringo.blogspot.com/2008/05/teach-yourself-you-t...</a>
Prrometheusabout 17 years ago
Ruby and Python seem to be in vogue for web applications. I'm a Ruby guy because I got tired of reading through flame wars and decided to pick one of them randomly.
aleoabout 17 years ago
<a href="http://norvig.com/21-days.html" rel="nofollow">http://norvig.com/21-days.html</a>
willphippsover 16 years ago
angel tech is a good book
visakhcrabout 17 years ago
Good knowledge of OS is a must..then some C, Perl will some handy...If you know unix shell programming, u can become a master in hacking...<p>and also, if you are a DB guy like me, then even with ordinary SQL, u can hack a lot of stuff...
评论 #191429 未加载