
Ask HN: learning web programming vs. tablet programming - the_gws
I am 36 year old with a very well paid and well progressing business career and I am bored to death. The idea of going to the office 9-7 for the next 30 years kills me. And I really believe I have a great corporate job so I now that the issue is having a corporate job.<p>So I am learning to program, a bit for fun a bit to see if I can start something of my own. The original plan was to learn web programming since I imagined web applications were both fun to develop and the best shot at a start-up. I took up Python and developed a simple file sharing application on Google App Engine (you can see it at myfilesinthesky.com but you don't lose anything if you don't).<p>Well, thinking about the interface and implementing the programming logic was actually fun. And it took 10% of the time. The other 90% was spent fighting with browsers' quirkiness and with Google App Engine (if I skipped GAE I would have fought with sys admin so not better I suppose). And that was teeth-cringing.<p>So I am not really sure web programming is that fun after all and the next step would be now to learn javascript to start doing browser-side wizardry which from what I'm reading around looks like as teeth cringing as it gets (ok, cobol programming is worse, I am sure).<p>And then I read Paul Graham's essays on tablets - paulgraham.com/tablets.html - and I am thinking now that ipad programming can be still promising business wise but much more fun since you have full control of the device and building native apps. No more need to get crazy with browser UI and sys admin stuff!<p>Before I spend the w.e. of the next six months learning C, obj-C and Cocoa, let me ask you, what would you advise to an aspiring programmer, learn web programming or dive into tablet programming?
======
jacquesm
I would advise you not to go looking for what others think you should do but
to start looking at this from a 'problem oriented perspective'.

Find something that you would like to have but that is not currently available
and then build that, that in turn will decide for the platform and associated
toolchain.

It is much better that way because you can't really make the case for what is
'better' for an aspiring programmer, web programming, tablet programming or
any other 'kind' of programming per se. It all depends on what you want to
achieve and programming is just a means to an end.

Also, under the hood all 'kinds' of programming are essentially equal (in
spite of many religious arguments to the contrary), it's in the end just a way
to very specifically tell a computer what you want it to do and in that
respect any programming will serve as a way to get better at every other kind
of programming.

The more you do it, the better you get, just like with every other skill.

Good luck!

------
EvanMiller
Learn C, then decide.

1\. If you like programming logic puzzles then you will enjoy programming in
C. In C, everything is a number, memory address, or byte array. So every
"while" loop you write is a new logic puzzle! But seriously, the things that
people tend to gripe about (pointers, segfaults, etc.) won't affect you if you
are good at logical reasoning and learn your way around a debugger.

2\. Learning C will teach you what's going on "under the hood" and make all
other programming seem easy. For some reason people like to say the JavaScript
or Ruby are great "beginner's languages," but I disagree. I think you should
learn to drive stick shift first and then graduate to automatic. Too many
people learn automatic and then think stick shift is unnecessary. Then when
their friend with a convertible gets drunk at a party, nobody can drive home,
and everyone has to sleep on the floor. If you know C, you will be the hero of
the party, and if something deep inside the system breaks or there's a
seemingly insoluble performance problem, you'll be the guy everyone turns to.

3\. I see a number of growth fronts for C programming.

A. Tablet programming. If you're not just writing Babe Alarm Clock apps and
want to get the most out of limited hardware, you will want to know C. You
might only write 5% of the app in C, but for critical logic paths, it can make
the difference between an app that feels like a prototype and one that feels
like a magic show.

B. Desktop programming. The Mac App Store will completely change the economics
of desktop software development. You'll be able to get a program in people's
hands (and money in your bank account) with minimal expenditures on sales or
marketing. This opens up a lot of potential for innovation and the creation of
new vertical markets that people didn't think existed. Microsoft will probably
follow suit with an App Store before long. For desktop programming on Mac or
Windows, you will want to know C because:

\-- As with tablet programming, sometimes you need to write a critical logic
path in C to get the responsiveness that users expect.

\-- The number of open-source libraries out there is large and continues to
grow. In most cases, knowing C lets you take advantage of them, even if only
to write a binding for some other language. In many cases you will be able to
write a great program just by slapping a pretty face onto an LGPL library or
two.

\-- GPU programming (OpenCL, DirectCompute, CUDA) looks to be an area of large
potential growth, and as I understand it the APIs look a lot like C. For
certain kinds of computations the GPU has 50X the throughput of the CPU.
That's like going from a 66 MHz Compaq with a Turbo button to whatever 2GHz
workhorse is sitting on your desktop right now. The ramifications for
scientific computing are large; many programs designed around a "click and
wait" paradigm can be rewritten to be fully interactive. There's a lot of
potential for disruptive innovation here.

C. Server programming. The web still has a lot of growing to do, and fast-
growing web companies need folks who know C. Most people will tell you that
for web programming you just need PHP or whatever, but when the going gets
tough, you're going to bust out some C. When I was on the server team at a
fast-growing chat company, nominally I just needed to know PHP and Perl, but I
found myself needing C in order to: 1. Fix a bug in Memcache that was horking
our graphs 2. Fix up the prediction algorithms in RRDtool 3. Write a PHP
extension for monitoring CPU time on Windows. I couldn't have done any of
those things without knowing C. If you want to be at a company that uses the
latest and greatest open-source server technology, at least somebody will need
to know C when you run into the programs' problems or limitations.

D. Web programming. This is still several years off, but the Google Native
Client is on the horizon:

<http://en.wikipedia.org/wiki/Google_Native_Client>

If it takes off, we're looking at a lot of desktop C/C++ code that will need
to be adapted or rewritten to run in web browsers.

4\. If you're hoping to be "very well paid" (esp. starting out at age 36)
knowing C is a good strategy. First, it sets you apart from the stack of
resumes touting Cocoa and jQuery knowledge. Second, knowledge of C is an
excellent way to get involved in open-source and have your contributions
widely used (and your coding skills validated). As a former boss of mine said,
there are basically two paths to the major leagues in software development:
first is to go to the right schools and get recruited into the right
companies, and the second is to contribute to open-source. The most popular
open-source projects are all written in C.

On a personal note, I've had to learn a dozen or so computer languages at
various points and I find C to be the most satisfying. It's a difficult
language compared to most, but if you know it, like it, and get good at it,
you can let other people worry about bullshit like CSS workarounds and
concentrate on getting the most out of a computer. Knowing C will seem
completely unnecessary as you get started on any idea, but as soon as you
start thinking any of these thoughts:

\- "I've done everything, but it's still not fast enough" \- "I've done
everything, but it still eats too much RAM" \- "If only I could use this
library" \- "If only I could use this system call" \- "If only I could fix
this bug"

...then if you know C, you will be the hero of your own party.

------
maxklein
Go for the tablet using ONLY native Objective C. Don't use PhoneGap.

It will be a good learning experience, you will be able to instantly test the
code, and there are no two ways about it. Few hacks or tricky stuff. It's a
pretty straightforward platform.

Also, you can easily earn money with this, and the money is purely passive. No
server administration, etc. You can finish it, put it in the store and run off
for the next year.

Also, you learn about memory management and device constraints.

If you want something even more interesting, consider a use-case like using a
tablet to control some hardware (like a lightbulb).

~~~
rick_2047
_Also, you learn about memory management and device constraints._

Didn't know that a tablet platform will have device constrain with so much
processing power at hand. Will someone enlighten me about the amount of low
level stuff (memory management and thinking about rams and disk space and the
likes) goes into writing software for iPad or even an android and iPhone.

~~~
gaustin
> Didn't know that a tablet platform will have device constrain with so much
> processing power at hand.

These devices (Android/iOS devices) are fairly limited in power when compared
to your average laptop or desktop.

For the iPhone and iPad, there's not much low-level stuff you'll normally
worry about. Memory management is pretty easy to understand. In most cases, if
you follow a few rules of thumb, you'll be okay.

------
ZeroMinx
I think the keyword here is "fun". You're "bored to death". You don't want a
programming career that will too bore you to death.

If you don't enjoy web development, do something else. The tablet could be one
way to go, but there are many many others, I don't want to give any specific
advise, as different people are attracted to different things.

Find something you really enjoy (which in itself could take a long time - if
you're not sure now, you could dive into one field for a while, see if it's
for you. If not, move on).

It might sound odd (and people might disagree) but I say don't focus on what's
business wise. Focus on finding something you love doing.

Best of luck!

------
Su-Shee
Learn both of it. And C is something to know anyways.

Fun in programming is about doing different things, exploring technology and
deliver a well-rounded project.

Also, you chose another field which is rather heavy on the GUI side - you will
soon realize that ALL GUI done right isn't really something done effortless.
It takes much work. Everybody wants to USE good user interface (be it GUI or
command line or API-wise) - but few people really like to CREATE them...

And: Web GUI and developing for tablets/touch-based devices are really just
two sides of the same medal - what if you need to make a tablet/touch-able Web
GUI?

Accept that browsers are strange beasts and get it over with with good
frameworks and you'll be fine.

Or choose the middleware or database-side of Web programming - also two good
options.

And also learn that "6 months to learn X" literally means nothing in the
programming world - there's ALWAYS a "6 months to learn X" ahead of you. Even
if you already know a handful of languages very well, have 2 decades of well
groomed experience - there's always a subject you know next to nothing about
and 6 months isn't really a long period to learn something fundamentally new
to you.

Those 6 month will never go away and there is no point you're working yourself
up to and then just stop and "be a programmer" :)

------
zephyrfalcon
_"Well, thinking about the interface and implementing the programming logic
was actually fun. And it took 10% of the time. The other 90% was spent
fighting with browsers' quirkiness and with Google App Engine"_

Yes, you characterize web development correctly. "The web" is a great idea,
but web programming the way is currently is, is an enormous pain in the neck
(and I'm putting it mildly). I don't foresee this becoming any better in the
near future, because instead of reinventing the browser and the outdated
models that come with it, we keep tacking things on to it.

So if your goal is to be "not bored", my advice is to look elsewhere. Well,
you may not be bored doing web programming, but you will definitely tear out
your hair in frustration, as you already found out. It won't really get any
better as you learn more; just more complicated.

(That said, I do have great respect for people who do this for a living. I'm
not sure if I would be able to do it for any extended period of time.)

Tablets are a different story, development-wise. It isn't necessarily easier,
but it's different, and it's more like "real" programming, rather than
figuring out what breaks in which browser and how to fix it, or wasting hours
tweaking your CSS. There are drawbacks, however. For starters, your audience
is limited. If you want to develop for iOS, you'll have to pay the Apple tax,
and go through their approval system if you want your app to show up in the
app store. Android imposes fewer restrictions, but it's more in flux, and good
tablets that run it are pretty hard to find. All these are things to take into
consideration.

Personally I am heading into the direction of tablet programming, although the
field isn't very mature yet.

------
aaronblohowiak
First of all, congrats!!! Most programmers never actually release anything on
their own. You should be proud.

>> Well, thinking about the interface and implementing the programming logic
was actually fun. And it took 10% of the time. The other 90% was spent
fighting with browsers' quirkiness and with Google App Engine (if I skipped
GAE I would have fought with sys admin so not better I suppose). And that was
teeth-cringing.

welcome to programming. programming is the gentle art of staying sane while
dealing with the stupid choices of the programmers that have come before you
(when you do this long enough, you will start to appreciate the difficulty in
making good programming choices.) the deeper your knowledge of a given stack,
the less pain you will experience. What's that old saying? "An expert is
someone who has made most of the common mistakes in their field."

Some platforms are better than others, targeting one platform is always easier
than targeting multiple platforms with the same codebase.

However, iOS programming is far less instantly-rewarding than web programming.
It also requires a deeper understanding of the way computers work, because the
resource-constrained device does not play well with high-level languages.

I suggest that you learn c, obj-c and cocoa because it will make you a well-
rounded programmer. after 6 months, you will then know if you like low-level
stuff or web stuff better. if you want to be doing the next thing for 20 more
years, it is worth 6 months to determine what fits you best in an empirical
way.

Check out <http://www.phonegap.com/> you might like it.

p.s. In ui design for the web, put a link to do the thing whenever you talk
abotu the thing. for instance, on your home page you say 1. Log in or sign up.
you should have those words be the same link as in the upper right. similarly,
when you say upload on the left, you could also just have a big upload screen
if the user hasnt uploaded any files yet.

------
grayrest
Programming for both is hard in different ways. With web programming, you can
generally throw together arbitrary designs quickly but once it works, you have
the second half of the work ensuring it works everywhere. With device
programming, you have an easy path to the platform defaults and a more
difficult path to arbitrary designs but (particularly on the iOS devices) once
it runs, you're pretty much done.

The hardest part of web programming is getting consistent results out of CSS,
particularly since this is generally non-repeatable. The best solution is to
use a CSS preprocessor (I recommend sass/compass) and up the abstraction a
level so you CAN repeat the solutions.

Javascript is comparatively stable. There are the same number of
quirks/variations in the raw browser APIs but the libraries are to the point
where they fill in the differences. I don't recommend programming a general
use site without a library. Most of the work in building the lib is
shimming+testing the differences between browsers, not doing the raw library
design+construction.

The trick to client side wizardry is modularization. You need something like
Sproutcore, YUI3, Backbone, or Knockout to do modules/KVO otherwise things get
out of control as your app size grows. It's a boring trick, but it's the
trick. All flashier tricks (and there are hundreds) are easy to copy, you look
at the source and pull out the interesting bits.

I'm a devoted frontend developer. Dealing with browser quirks is annoying but
I think the web is the healthiest platform available and I like not being a
sharecropper.

------
enoj
Well, thanks to software like PhoneGap and Javascript/CSS libraries like
jQuery mobile (and many others), writing a "tablet app" is much the same as
regular web development.

You can create an app with a native look and feel with pure
HTML5/Javascript/CSS, and you can build it as native apps for iPhone and
Android, and have it hosted on their app stores with the same codebase.

For platforms that doesn't offer app stores, you can just provide them with an
URL to your app so they can use it in a regular browser (also using the same
codebase). The development process can also be simplified, since you can do
much of the development with a browser, compared to re-compiling for each
iteration of development.

There are of course some applications that aren't suitable for being run in a
browser, but in many cases you can, and being able to share codebase between
all these platforms seems just great.

Arstechnica released their iPad app a month ago, based on HTML5/CSS/Javascript
and built with PhoneGap, and they explain very well how and why they did it
that way: [http://arstechnica.com/apple/news/2010/11/introducing-the-
ar...](http://arstechnica.com/apple/news/2010/11/introducing-the-ars-technica-
reader-for-ipad.ars)

I would definetely learn regular web development, and not lock myself down to
a single platform. Especially with these cool tools like Phonegap.

------
drpancake
This is a difficult choice to make because we're at an interesting crossroads
in application programming. My gut feeling is that web programming will win in
the long-term - there's so much competition between browsers now that the pace
of innovation is faster than ever. There's still a long way to go though.

Web programming is great once you surrender to the fact that frameworks are
the way to go. At first, yes, it's essentially magic. But once you get
experienced and you delve deeper into the framework you can assimilate the
(hopefully) insightful design choices made by the developers. If you choose
web programming, I would highly recommend the Sencha frameworks: Ext JS 4.0 is
out soon and Sencha Touch is looking very promising.

On the other hand: the iOS stack is mature, well thought-out and will teach
you good programming practices. It's also where the money is right now - an
iPhone/iPad shop I know here in the UK is literally struggling to recruit. I
see it as a bubble akin to early web development; a lot of companies jumping
on the bandwagon just to have their own 'app'. You've also got to choose
whether to learn Android or iOS, which is a whole other discussion!

I'm honestly not sure what to suggest. Personally I'm an experienced web
developer learning iOS development and it's been fun so far.

------
raquo
A big part of the fun of programming IMHO is seeing the results of what you
are writing. I try to center my workflow around that – always having my app
buildable, working in small increments, changing what feature I work on as
soon as it starts to bore me. Being rather new to programming, a lot of common
issues can be real problems for me (e.g. xcode build settings). Be sure to
standardize your debugging process. What helps me most is starting to write a
question on stackoverflow and thinking what people would need ask me (did I
check X? What Y returns?).

Regarding your main question, web seems more fun to me (I've done both a bit).
You can iterate faster and push updates more often. Surely I hate having to
mess with the server, but generally I set it up and need not touch it for
another couple months.

------
newhouseb
Web programming, specifically taking advantage of all of the APIs HTML5
provides.

All existing tablet devices are very friendly to HTML5 having all being built
off of webkit (Android and iOS). So you can kill two birds with one stone and
not have to worry about IE compatibility.

------
petervandijck
Learn what you are most interested in. If this is gonna be the next 30 years,
it really matters little if right now you learn language X or language Y,
you'll have to keep learning anyway.

------
adriand
You should start by purchasing a mouth guard, since if Javascript makes your
teeth "cringe" then you're going to need it for every other kind of
programming you attempt.

What I really mean by that is you're going to need a great deal of patience
and perseverance to get good at any kind of programming, and even when you do
get good at it, you're still going to end up battling things that have nothing
to do with the programming language you choose (like browser compatibility
issues, bugs that are other people's fault, bugs that are your fault that take
you 7 hours to track down, etc.)

It's easy to enjoy things you are very good at, but to get there, you're also
going to have to enjoy not being very good at all.

To answer your original question, if you are seeking to participate in an
exciting new field, work on the tablet programming. If you want something
where you can accomplish cool things with relatively few headaches, stick with
Python but drop GAE and go with "normal" hosting.

------
ams6110
Cobol programming was actually not teeth-cringing at all. Boring, tedious,
even mindless... yes. But you were working in a top-to-bottom stack from one
vendor, with pretty much one standard set of patterns to learn and follow.

------
forgottenpaswrd
It depends of what you want to do.

IMHO it is really stupid trying to do what makes old standard programming
shine(c, c++,python{this could be used to program web too}) with web
programming, as it it not good idea to use old languages to manage documents
and information(in which web programming shine).

You will find people that only have experience with one of those camps that
will tell you that you only have to know one of them(when you only have a
hammer see every problem as a nail.)

So I recommend you: first understand where you want to go, then learn the best
tools for getting there, not the other way around.

------
xentronium
Big share of 'fun' in programming comes from exploration (the other big thing,
at least for me, is watching how something cool emerges from vast nothingness
of void, even if my creature looks like Frankenstein's monster); be brave and
courageous, try everything, have a look and feel of the bleeding edge of
technology.

Other than that, avoid MUMPS :)

------
radu_floricica
Learning a bit of system administration and renting a vps is probably better
long term.

I'd say tablet to the original question, but Android. In time it will spawn a
much bigger ecosystem then Apple can or wants. Java is much cleaner then it's
painted, and in time all the jvm languages will be useful on Android.

------
shoeless
I suggest trying to learn platforms and technologies that apply broadly, at
least to start out. That typically means standards - HTML(5), CSS, Javascript,
etc. If you create something of value, you will want it to run on the broadest
set of platforms/devices possible.

------
S_A_P
I say build what interests you, regardless of the platform. That is the only
way to stay focused. Building what you think someone may like probably wont
work unless you are more disciplined than I...

