Lurker News
Been doing application development, primarily backend development, for a number of years. I've always found it quite easy to move up and down the stack and work anywhere from UI down to the bare metal in a number of environments and languages, and always the 'fast learner' who quickly knows the system inside-out, even when thrown into some area that I've never seen.

Lately I've been doing some web development on a fairly long-lived and large code-base, but I'm finding it MUCH harder to wrap my head around than application development ever was. I think my difficulty is that the whole environment feels so... HACKISH... everything is a horrible hack on top of a horrible hack. (yes, I'm familiar with the history, been using the Internet since before the web) I'm not even talking about the fact that everything has to be stateless, in fact I develop desktop apps as stateless even driven UIs as well, but just the fact that it really feels like there's no consistent way to do anything, there are 1000 different frameworks, all with their own way of doing the most basic tasks, and my experience is that they all ... well... suck.
Am I missing something? Is it me resisting change? Is web programming really that bad? Is it really just that I need a new mental paradigm?
Can you recommend any good resources to help me orient my mind to this new way of thinking?

Comments (661) 164 threads

Earlier comments
TickleSteve1 reply#
Yes (simple answer).

but really, its less "hacks on hacks" and more "unneeded abstractions on unneeded abstractions".
The inefficiency of modern web-stacks continues to absolutely astound me.
When people tout the 'efficiency' of language A against the equivalent C as being "less than 2x"...
jeez... that means you're throwing away double the power that you need to. That means you've got double the number of air-conditioners cooling your server-room. double the power bill, etc...

Crusoe123#
...and half the people.
nostrebored2 replies#
There is some stuff that actually makes logical sense, like CSS Specificity, but yes a lot of it is hacky. I mean, negative margins? Clear? Thirty different lines of browser-specific rendering tweaks?

WebKit is great, but any attempt to reform the competing browser shitshow reminds me of that xkcd comic about competing standards: https://xkcd.com/927/
(former web developer -- get out while you have your sanity)

mirkules#
Rather surprised you didn't mention vertical alignment. I mean, this year marks the 20 year anniversary of CSS. 20 fucking years of not having vertical align!

(before someone says "flexbox", remember it's still in "working draft" stage)

combatentropy#

  > a fairly long-lived and large code-base
Such could be spaghetti on any platform. To understand web programming, I wouldn't start with something big and old. I've been doing web programming for more than a decade, and I still don't get the majority of web frameworks. Start instead with the basics, and work your way up:

1. HTML. Don't view the source of websites and web apps to understand HTML. Read a good book or tutorial. HTML Dog is a good one.
2. CSS. Likewise.
3. JavaScript. Definitely don't try to learn JavaScript by viewing source either. Instead, maybe HTML Dog. There's also Douglas Crockford's _JavaScript: The Good Parts_ and David Flanagan's masterpiece, _JavaScript: The Definitive Guide_. I don't know how I would have ever understood JavaScript if I had not taken the months to read Flanagan's book cover to cover.
That takes care of the client side. For the server side, it should come much more easily. Basically you have a database, like I'm sure you're used to. Then you need a web server, like Apache or Nginx, and some kind of glue language like Python or PHP. Many people put a lot of code here. But I like to keep it pretty thin: like the database and the browser just talking to each other. Even so, just running this side of the affair can be a full-time job in itself.
I recommend at some point familiarizing yourself with the HTTP protocol in general: all the headers, request methods, etc. Basically once you can use Telnet to imitate a browser requesting a page, you'll feel more comfortable with how simple it really is.

narrator2 replies#
>Can you recommend any good resources to help me orient my mind to this new way of thinking?

The thing about web frontend development is that it suffered from the browser wars and having to appeal to amateur developers. Amateur developers love "Worse is Better"[1]. Basically sacrifice all consistency in favor of simplicity and getting started quickly. "Worse is Better" makes things simple to the point of making ugly hacks for certain situations that don't fit that extreme focus on simplicity.
The browser wars made everything horribly inconsistent. Microsoft's strategy was to make the most broken non-standard code possible automatically work and everyone had to emulate that.
The most clean frontend development I've worked with was Angular with ScalaJS. Typescript in Angular 2 should be really clean. The underlying web browser stuff will never be cleaned up since it has to be backwards compatible.
[1] https://en.wikipedia.org/wiki/Worse_is_better
Edit: Replaced the JWZ URL with wikipedia. Apparently JWZ has some anti-hacker news redirect code on his site.

MrJagil2 replies#
Ok, this is really weird, why did your link forward me to this NSFW page until i copied the URL manually into the address bar (Again, NOT safe for work): http://imgur.com/32R3qLv Hovering showed the correct jwz url as well. Is that your or JWZ's doing? JWZ's page has even retained the imgur favicon (chrome, mac).
detaro1 reply#
Because JWZ doesn't like HN and thus has decided to childishly redirect all traffic coming from HN to this.
MrJagil#
Thought so! Thanks. Guess the web is broken after all.
xenophonf#
You can use something like RefControl to remove the HTTP Referer header that JWZ uses to implement the redirect.
wazoox1 reply#
Angular feels clean enough, but how do you implement internationalisation properly? How do you switch to angular 2 now that angular 1 is obsolete? Same thing with bootstrap (v2 is largely incompatible with v3 which is mostly incompatible with v4)... Backend is okay; frontend really is a clusterfuck, because it seems all built for short-lived, one shot applications. I build professional applications that have to live and evolve for ages, and I'd rather not rewrite the 80000 LOC of code for every brand new shiny incompatible material design fully reactive 3D enabled VR compatible à la mode fashionable trendy JS+CSS framework that'll be obsoleted in 9 months.

At the moment, I really don't know what to do. Looking at the way people build applications nowadays (does somebody NOT use node.js and npm at some point?) with layers upon layers of languages, frameworks, 4 different module management systems, with READMEs that read like "install the dependancies using "gem install A B C; pip install E F G; npm install X Y Z; go install U V W; cargo install P Q R; then proceed with curl https://github/myshit/install.sh | bash" is really tiring.
Ghaaaaa!

narrator1 reply#
I was using node.js for a while and having to deal with the same bugs over and over again. Usually the bug would be passing the wrong type or mistyping a name. I started using Typescript and things got a lot better. Scala.js is great and all, and probably a good choice if you're using Scala on the backend, but Typescript works a bit better because the Javascript it generates is pretty close to the original. If you search the HN archives, people seem pretty happy with it.
premium-concern#
The difference is that Scala is a vastly better, designed language. It's not something like Typescript which tries to salvage JavaScript without being able to fix the worst parts.

Scala also has much better, more mature tooling and IDE support.
The build system is also amazing, not the mess cobbled together in JavaScript that is changing every second week.
In addition to that you have stable, existing and mature libraries which work on multiple platforms, achieving _real_ cross platform support. (Not this "if you make JavaScript run outside of the browser..." nonsense.)
Plus, the quality of libraries is so much higher because they aren't written by JS kids with a maximum attention span of 5 minutes.

Load more comments