Live data from Hacker News

Ask HN: Is web programming a series of hacks on hacks?

news.ycombinator.com

441–450 of 688 posts

Re: Ask HN: Is web programming a series of hacks on hacks?

#441
As a non-web-dev, the hardest problem I've encountered is choice.

Which framework should I choose to do X? To do Y? Do they play together? Are they still supported? Are they well documented? What assumptions are made by them?

There are dozens of options for most things, but no guide to them.

Re: Ask HN: Is web programming a series of hacks on hacks?

#442
Hackish? yeah!, immature? still yes!, sucks? hell no!

I believe the very nature of the web, and the internet itself, is a story of a hack onto another hack.

Think about the first internet communication mediums, protocols, etc. They were all "hackish" solutions. Internet over the telephone landline? why not? change it to the cable TV infrastructure? Sure!

The web itself morphed from text-based solutions (think telnet, gopher) to hyper-text documents and nowadays to full-applications. I acknowledge that this last iteration has been a growing pain indeed, it's a mess and hasn't been consolidated, yet.

Nevertheless I think the reason behind this hackish nature is due to the fact that the web (and the internet as a whole) are always pushing towards an Open Platform, open to everyone to develop and consume, without any corporation behind it.

Compare that kind of ecosystem with the more closed less-hackish ecosystems like Windows/OS X, Android/iOS app development, you can see the difference.

Just my two cents :)

Re: Ask HN: Is web programming a series of hacks on hacks?

#443

Earlier quoted context omitted.

HTML, CSS and SQL aren't programming languages, if Turing completeness is a requirement to be a programming language.

> if Turing completeness is a requirement to be a programming language Many languages (in the formal sense) aren't Turing complete, so this certainly isn't a requirement to be a formal language. It would be odd to come up with a definition of language that excludes regular languages, for example. TBF you did say "programming language", not just "language". But once we move from the mathematical setting of formal lang…

This seems like a great place to observe that Magic The Gathering is Turing-complete. If your requirements suggest that MTG is a programming language, but HTML isn't, they're probably bad requirements.

The syntax/semantics/instructions option seems like a way better basis. And honestly, most of us can get by with a Potter Stewart style standard of "know it when I see it".

Re: Ask HN: Is web programming a series of hacks on hacks?

#444

Earlier quoted context omitted.

it's not, because Mongo has huge issues [0] and angular is generally a giant mess and a pain in the ass [1] [0] http://blog.runnable.com/post/149000201856/think-before-you-... [1] if you haven't used angular, ask someone who has

I work on a large (500000+ lines) of Angular daily. Maybe this represents some sort of Stockholm syndrome, but it's really not that bad?

Over half a million lines of Angular? May I ask what the application is and how that's broken down language-wise?

Re: Ask HN: Is web programming a series of hacks on hacks?

#445
Lately I've been doing some web development on a fairly long-lived and large code-base

Therein lies the problem. I've been doing web development for 22 years and it's only just now getting good. React-like apps (I actually use Mithril) give you a much better understanding of how the app gets into a particular state when compared to jQuery.

Web programming on your typical long-lived large code base really is that bad, but start from scratch with something React-like and you'll have a much better experience.

Re: Ask HN: Is web programming a series of hacks on hacks?

#446

Earlier quoted context omitted.

I think your use of "minimum" is wrong here. If you're using React running on Node and Webpack as your task-runner you just need Javascript and that's it. Node allows you to run isomorphic JavaScript that runs on both your server side and client side (to ensure you don't end up with the Angular-style skeleton pages coming from the server), You can pick a nice ORM (like sequelize) to abstract away SQL, and Webpack all…

> ... to abstract away SQL SQL already is an abstraction, why would I want to abstract it away? Why not abstract JS away instead?

> Why not abstract JS away instead?

Lots of projects are already doing this: Elm, ClojureScript, PureScript, etc.

Re: Ask HN: Is web programming a series of hacks on hacks?

#447

Earlier quoted context omitted.

> I'd say building Win32 GUIs in C++ was easier than current Web stack. >Same with Java AWT and Swing libraries. I will have to vehemently disagree. I have no experience with Win32 GUIs, but I still have nightmares about wrangling nested LayoutManagers: comparing that to the current state of the web (especially after Flexbox) is downright absurd. I am very happy with: Typescript + (Sass|LESS) + framework (Angular|Boo…

And I have to disagree with you. Doing UIs in native frameworks like JavaFX or even in a pure C++/WinAPI, is much more saner than doing any kind of UI in HTML/CSS. Ignoring flexbox for a second, which is kind of bleeding edge new thing, remind me - how exactly do you vertically center stuff with CSS? :P. My two main issues with doing UIs on the web are: - web stack is terribly unpredicatable; you're trying to force a…

> Ignoring flexbox for a second

Not ignoring Flexbox, this is the crux of my problem with web development. There are 8,476 different frameworks, transpilers, toolkits, and what have you that all kinda-sorta do the same things. When first approaching this world you get confronted with alphabet soups of packages all combined to "make front end development sane". Everybody seems to have their own soup, though, and many claim that theirs is the way to do development. The flexibility that so many Node-style devs love leads directly to this impenetrability and fragility.

Re: Ask HN: Is web programming a series of hacks on hacks?

#448

Earlier quoted context omitted.

> ... to abstract away SQL SQL already is an abstraction, why would I want to abstract it away? Why not abstract JS away instead?

Well, everything is an abstraction, down to zeroes and ones.

Oh, it goes so much further down than that.

Re: Ask HN: Is web programming a series of hacks on hacks?

#449

Earlier quoted context omitted.

I agree—I loathe frontend development, but React made it tolerable to do for limited periods—but it's still a hack on a teetering Jenga tower of hacks.

The really funny thing is that the OS runs a simple event + render loop, then the browser implements a wildly complex stateful/declarative structure on top of that (the DOM), then React apps create a simple event + render loop again, this time with special diffing logic to update the underlying DOM as little as possible

This is a great insight. I'd never noticed this about browser stuff, but it's definitely a major issue in video game development.

Like, most game dev frameworks (especially for mobile) leave you with device-level looping, under language-level looping, under framework-level looping, under code-level looping. This, obviously, is hell.

The result is that something as simple as "play this sound file, looping when finished" ranges from awkward to literally impossible. Memory access, garbage collection, and framework timing all collide and leave you with mysterious multi-second gaps while everything tries to sync up. And so everyone building something serious has to dive down past LibGDX into awful, ground-level things like Hammer or un-frameworked C++/Java/etc.

I'm not sure what the cure is - unlike a AAA game, there's room for a tiny bit of inefficiency in a webpage. 0.1-0.5 second loads are reasonable, instead of 0.01 second frame renders. But right now the endless layers are spitting out far too many 10 second load times, and no one even seems to notice the redundancy.

Re: Ask HN: Is web programming a series of hacks on hacks?

#450

Some people have already mentioned GWT. I think this is the best evidence that yes, web programming is extremely hackish. GWT is an entire framework to write web applications in a strongly typed language - it compiles Java down to JavaScript. GWT was made in an era that we're just now escaping: the era of browser quirks. IMHO, GWT didn't take off because of one reason: Its target demographic, web developers, do not h…

> Its target demographic, web developers, do not have the same technical training as traditional computer scientists

I think this is the money quote, and the reason why this thread is full of such ill-informed opinions.

I have a degree in CS. I've done systems programming, devops, and mobile before settling on web. Just recently I joined a company of very strong back-end people with a severe dearth of people who have any knowledge or interest about web. The web doesn't have to be that bad -- just for some reason, it's the orphan child """real programmers""" don't work with.

Post reply on HN