Live data from Hacker News

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

news.ycombinator.com

631–640 of 688 posts

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

#631

Earlier quoted context omitted.

And how many frameworks can you count in a win forms or wpf application? If we're going to count frameworks, there'd be no end it. As I once said, programming is abstraction upon abstraction. Like an onion, a Russia doll or better still, inception. Frameworks abound everywhere, at every layer. You just need to adjust your scope as you see fit, to find them.

Honestly from the programmer's perspective, it's really just one framework: .NET. I know that .NET abstracts away other frameworks such as the Win32 API, but generally you don't need to know any Win32 API etc. to make a Winforms / WPF / etc. application. With modern "web application" style development, it seems these days you need to know multiple frameworks by default, for better or for worse. More to the point, .NE…

I'm not sure what sre you talking about, if you program with c# and wpf, you need to know xaml and their weird syntax, you need to know prism which is a framework to properly organize your UI, you need to know a server language like asp. Net if you want to deal with backend code.

Prefer winform? That's much like react without using jsx, and if yoy want fancy graphics is much more complicated than html. Now sure you can stick to system style, but you can also buy css themes, use bootstrap, material ui frameworks to have your already prepared ui in html too.

Same issues with qt libraries... The thing is simple: inevitably you need more layer of complexity if you need to be able to maintain the code while being open to changes.

For simple apps, sure winform is faster, for complex apps, no way, it's the same.

And you can't really say that.net is a single framework when it includes so much stuff that is bigger than react, node, webpack, css and html put together

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

#632
Everything is a mess, so keep it as simple as possible. Yeah it's nice to have an awesome frontend with javascript but it's much simpler and cleaner to post something back to the server.

I fell in love with web programing 14 years ago because I don't have to save the state of the UI and activate or deactive buttons.

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

#633

Earlier quoted context omitted.

sql.query is a function that will receive two arrays, one is the strings part, the other is the injected values... the template processor takes those arrays and turns it into a parameterized query to the database.

Very cool! In that example though... where's the array? And don't backticks do string interpolation?

Backticks by themselves will do string interpolation. But backticks with a function name in front will do something a bit different. In this case 'sql.query' is a function and the JS will pass it an array which represents the contents of the backtick string. There the function can do what it likes and return a result. 'sql.query' builds a proper (and safe!) SQL query and executes it.

The backtick feature in ES2015 is really cool and allows for some great DSL type features.

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

#634

Earlier quoted context omitted.

I'm sorry but I beg to differ, web programming 10 years ago was a nightmare. It's much better today. It's not web programming that sucks, it's programming with others. I bet most people won't complain much if they got choose what tools they wanted and worked alone. When working with others, different ideas and opinion clash heavily. Programmers are not best known for their awesome communication and the lack of it lea…

> laravel but not not enough php I haven't used those much, just glanced over a system written in them. But that sounds bizarre: I thought the whole point of PHP was to be bland and mainstream. If you know how to program at all, then what is there to learn about it?

I didn't mean that as a criticism. These are all good choices for the role that PHP was intended to play, being the language that everyone writes 10 lines of for their personal website.

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

#635
post #629

Earlier quoted context omitted.

> 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 If they do the same thing, pick one and dig in. I really don't get this argument - walking down the cereal aisle will not generate this amount of antipathy despite the amount of choice available; why on earth should developm…

> If they do the same thing, pick one and dig in. I really don't get this argument - walking down the cereal aisle will not generate this amount of antipathy despite the amount of choice available; why on earth should development different? If I don't like the cereal I've wasted a couple of bucks. Picking the wrong framework can be much more costly in terms of time/money. And with the amount of framework churn you ca…

And as he said (and it bears repeating): "This is important - don't be the guinea pig and don't jump onto the latest and greatest."

How to pick the right one: age ("old" but not too old) x community x documentation

For the simplest developments I used jQuery (which is a thin layer over pure JS). If you need more complexity you could go for a higher level framework (but there were not so great things like JavascriptMVC)

PHP gets a lot of bad rap but Fb is built on it

There is no perfect solution. When I see people "praising" Win32 I can just laugh (no, really, anything is better than this: https://msdn.microsoft.com/en-us/library/bb384843.aspx) but I think the advantage of that is that there was only few alternatives so once the learning curve was gone that was it)

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

#636
post #412

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…

> Node allows you to run isomorphic JavaScript that runs on both your server side and client side But then you're writing JavaScript on the server side, and I think I'd rather shove live weasels down my trousers than write one line more of JavaScript than I absolutely must.

Damn, I see so much frustration from you for not being able to understand JavaScript here... once you understand it's a different language instead of trying to write your favorite language with JavaScript syntax it'll get better, buddy, relax :)

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

#637
post #412

Earlier quoted context omitted.

> Node allows you to run isomorphic JavaScript that runs on both your server side and client side But then you're writing JavaScript on the server side, and I think I'd rather shove live weasels down my trousers than write one line more of JavaScript than I absolutely must.

JavaScript is a fantastic language. I don't get this animosity towards it. A decade ago it was made fun of by people who "use real programming languages" but JavaScript has grown up. It's actually very good and very fast. ES6 brought improvements but honestly ES5 is still a great language.

Totally agree. The lack of understanding of JavaScript's paradigm from some people make them blind about the language power, it has the enough amount of every needed paradigm there, including OOP, functional and evented. I see in the comments here people complaining about things like dynamic `this` when they just don't understand it's one of the biggest powers of JS.

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

#638
post #24

Yes. I feel like we're in the dark ages right now. JavaScript - Dynamically typed, does not scale what so ever. Code written in it becomes 'read only' very quickly. Impossible to refactor. CSS - Also becomes impossible to manage. Who knows if the class you wrote is or isn't being used in HTML or JavaScript somewhere. Same problem, read-only, it only gets bigger and more unmanageable. HTML - At the heart of it, the fo…

If anything, this understates the problem. A modal web application today takes an absolute minimum of five programming languages and three frameworks: * HTML * CSS * JS * A server-side language (eg Python) * SQL And then come the (leaky) abstractions on top of them: * A framework to make JS bearable (eg Angular) * A framework to make server-side bearable (eg Django) * A framework to make CSS bearable (eg Bootstrap) .…

this is a bit disingenuous. the back-end technologies are quite stable and based on not-perfect-but-reasonable semantics. Django/SQLALchemy don't change that much.

Front-end on the other end is a mess. JS/HTML/CSS as tools are clearly unfit for the current needs.

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

#639
post #627

Earlier quoted context omitted.

I mean, I like C#, but that stuff seems to me to be sitting several levels above the OS anyway.

Because most likely you never spent time using or learning the technical details of the OS developed at Burroughs, Xerox, ETHZ, DEC, MSR,.... Also I didn't mention just C#.

I just mentioned it because I'm familiar with it and I am excited about the .NET Core stuff letting you use it in more places.

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

#640
post #565

Earlier quoted context omitted.

Honestly from the programmer's perspective, it's really just one framework: .NET. I know that .NET abstracts away other frameworks such as the Win32 API, but generally you don't need to know any Win32 API etc. to make a Winforms / WPF / etc. application. With modern "web application" style development, it seems these days you need to know multiple frameworks by default, for better or for worse. More to the point, .NE…

You are confusing .Net, C# and WP* frameworks. .Net is closer to the JVM, C# is the language and WP* are libraries that interact with w32 apis

Not trying to be pedantic, just posting to set the record straight:

- WPF, WinForms, ASP.NET, ADO.NET etc. etc. are all officially part of the .NET Framework.

- WPF doesn't do much (or any) direct interaction with Win32. It uses Direct#D for rendering.

- The CLR is the .NET equivalent of the JVM.

It's useful to look at the .NET Framework the same way as the standard library that ships with the JVM. They're both large standard libraries that include GUI Library (AWT, Swing, JavaFX, Winforms, WPF), database access (JDBC, ADO.NET).

In both cases, the extensive standard library can easily be used by multiple languages (i.e. VB, C#, F# in .NET, Java, Scala, Clojure and many others on the JVM).

Post reply on HN