TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

822 点作者 barefootcoder超过 8 年前
Been doing application development, primarily backend development, for a number of years. I&#x27;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 &#x27;fast learner&#x27; who quickly knows the system inside-out, even when thrown into some area that I&#x27;ve never seen.<p>Lately I&#x27;ve been doing some web development on a fairly long-lived and large code-base, but I&#x27;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&#x27;m familiar with the history, been using the Internet since before the web) I&#x27;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&#x27;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.<p>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?<p>Can you recommend any good resources to help me orient my mind to this new way of thinking?

151 条评论

pixie_超过 8 年前
Yes. I feel like we&#x27;re in the dark ages right now.<p>JavaScript - Dynamically typed, does not scale what so ever. Code written in it becomes &#x27;read only&#x27; very quickly. Impossible to refactor.<p>CSS - Also becomes impossible to manage. Who knows if the class you wrote is or isn&#x27;t being used in HTML or JavaScript somewhere. Same problem, read-only, it only gets bigger and more unmanageable.<p>HTML - At the heart of it, the foundation is the layout engine and positioning, and it sucks. Flexbox was supposed to bring sanity, but I feel like we&#x27;re still waiting on it.<p>Put these three stooges together and you get where we are today. Rewriting the same damn app every year in another framework in what can only be described as some sort of high paying purgatory.
评论 #12478922 未加载
评论 #12477505 未加载
评论 #12477429 未加载
评论 #12477563 未加载
评论 #12479527 未加载
评论 #12477710 未加载
评论 #12477571 未加载
评论 #12477718 未加载
评论 #12494266 未加载
评论 #12480787 未加载
评论 #12480244 未加载
评论 #12477722 未加载
评论 #12477890 未加载
评论 #12478960 未加载
评论 #12479008 未加载
评论 #12480962 未加载
评论 #12477814 未加载
评论 #12480190 未加载
评论 #12479473 未加载
评论 #12478589 未加载
评论 #12481712 未加载
评论 #12477802 未加载
评论 #12478496 未加载
评论 #12478748 未加载
评论 #12479929 未加载
jaredklewis超过 8 年前
I think it&#x27;s worth noting that back-end web development is an usually pleasant place. In most other types of programming, many technical decisions are made by the platform and working with tons of legacy cruft is the norm, not the exception. For example, where else can you so freely choose the programming language?<p>Linux Driver? Use C. Mobile App? Java or Swift&#x2F;Objective-C for Android or iPhone, respectively. GUI App? Again depending on your platform that will be either C++, Swift&#x2F;Objective-C, or some .NET thing. Making a neural net? You could do everything from scratch, but it probably makes more sense to just use a platform like Tensor Flow and python.<p>Backend web development on the other hand: use anything! Wanna use lisp? Go ahead. Wanna store your data in an unproven experimental database? No problem. Wanna use micro-services? Monoliths? Anything goes.<p>Browsers are extremely complex application platforms. But despite how you may feel, they didn&#x27;t succeed because of their weaknesses. The browser as an application platform succeeded because of its strengths. Web browser are the least bad option (and beat out many other worse options).<p>For better or worse, browsers are what we have. Make the most of their strengths, and deal as best you can with the weaknesses.
评论 #12477659 未加载
评论 #12477639 未加载
评论 #12477549 未加载
评论 #12477537 未加载
评论 #12477692 未加载
meshko超过 8 年前
It is scary how most commenters here are missing the point. No, not all programming sucks. Yes, web programming sucks more than other things. No, it doesn&#x27;t have to be like this. Yes, even web programming was better 10 years ago. No, I don&#x27;t know how to fix it. Neither do I know exactly where we took the wrong turn. One of my theories is this: had Sun not sued Microsoft over their extensions in JVM, MS would have kept working on their awesomely fast JVM implementation for Windows. That would make Java fast and not sucky in browsers. It would have kept Java Applets as a viable rich web app development option. Flash would have never risen. Java, being a significantly superior language to ActionScript, would have allowed us to build nice RIAs in an efficient, secure and portable way. Gmail and Google Maps would have been implemented in Java. Isometric Java. Get it? Get it? Back end and front end are written in the same language with strong typing and all that. JavaScript would have been dead by now. World would have been a better place.
评论 #12477601 未加载
评论 #12477464 未加载
评论 #12477427 未加载
评论 #12477835 未加载
评论 #12477487 未加载
评论 #12478314 未加载
评论 #12479730 未加载
评论 #12479212 未加载
buzzybee超过 8 年前
Web programming has never been wholly controlled by a platform owner. I think that&#x27;s the main difference from any traditional environment that might come to mind; Unix has its traditions, so do Windows and Mac. This is even the case for mobile. In the years when IE was the only browser anyone used, one could also hope to come to grips with its buggy CSS implementation, but that is past too, and in the meantime the backend was still churning from Java and the classic LAMP stack towards Rails and Python.<p>This is the end result of uncoordinated, path dependent &quot;bazaar&quot; dynamics where the core technologies are open, yet keep accumulating cruft, and are subject to regular proxy wars between large entities. The solutions today are better in that they are easier along certain axes - you can make a cookie-cutter landing page out of the box with Bootstrap, or add some interactive data viz by employing D3. For any random one-off there is an npm package that depends on 50 other packages. They mostly aren&#x27;t there to help you architect your own thing in a self-consistent way, though - that&#x27;s too much of a &quot;vitamin&quot; and not enough of a &quot;bandaid&quot; to be marketable.
评论 #12477355 未加载
troels超过 8 年前
My theory is that everything is a mess, once you get close enough to notice. Every profession that appears as if its practitioners know what they&#x27;re doing really is a shocking hodge-podge of temporary solutions, strung together by proverbial duct tape. From doctors to flight engineers to anything else that you thought was running like a smooth machine. Programming is no different.
评论 #12479673 未加载
评论 #12480325 未加载
评论 #12479503 未加载
评论 #12485037 未加载
broodbucket超过 8 年前
Honestly, pretty much everything is hacks on hacks. As a kernel hacker, hardware is hacks, firmware is hacks, kernel is hacks, it&#x27;s turtles all the way down. The fact that anything works at all is a miracle. Some systems are better than others, but everything has some duct tape somewhere.<p>Designs and algorithms are abstract, the implementation is never as nice. We as engineers have to make the best of what we have, and to prevent making the situation worse to the best of our ability.
评论 #12483213 未加载
评论 #12478433 未加载
Uptrenda超过 8 年前
Technical:<p>* Multiple browsers that respond to the same code slightly differently.<p>* Multiple platforms that all need to be supported.<p>* Countless different screen sizes to consider.<p>* Standards that aren&#x27;t supported across browsers and platforms (and different versions of each in use)<p>* Hundreds of undifferentiated web frameworks that all claim to do the same basic task better than each other.<p>* Thousands of ways to host, distribute, and scale your application.<p>* Millions of ways to monitor service availability.<p>* Billions of ways to create APIs for your service.<p>Professional:<p>* Too many technologies and skills needed to do the job.<p>* Design skills required if you want to create anything significant by yourself.<p>* The average web developer is practically an encyclopedia of technology yet full stack developers are still undervalued, low-paid, and mostly replaceable.<p>tl; dr: It takes a very special kind of person who doesn&#x27;t immediately develop serious neurosis working as a web developer today.
评论 #12478893 未加载
评论 #12478935 未加载
评论 #12477948 未加载
kinkdr超过 8 年前
Without specific examples on what your frustrations are, my best guess is that you are just overwhelmed.<p>It was not long ago that I was in a similar situation like you, all these overlapping technologies looked unnecessary and redundant. Just the node ecosystem by itself, felt like a pile of crap that depended on a bigger pile of crap. For a simple application like &quot;hello world&quot; in React, I have to choose between a large number of possible combinations of packages and install and configure god knows how many of them.<p>But once you take sometime to adjust and familiarize yourself, you discover that each one of them is a little jewel and are the quite opposite of crap or hack you initially thought. At least that&#x27;s the conclusion I arrived to.<p>So, my advice is to just take your time to familiarize yourself with as many technologies as you can in every aspect of web development. After the initial shock, you will start appreciating things and you will realize that they are made by excellent engineers and each has its own merits.
评论 #12481439 未加载
xg15超过 8 年前
I think the &quot;design notes&quot; section of the HTML5 spec puts it best [1]:<p><i>It must be admitted that many aspects of HTML appear at first glance to be nonsensical and inconsistent.<p>HTML, its supporting DOM APIs, as well as many of its supporting technologies, have been developed over a period of several decades by a wide array of people with different priorities who, in many cases, did not know of each other&#x27;s existence.<p>Features have thus arisen from many sources, and have not always been designed in especially consistent ways. Furthermore, because of the unique characteristics of the Web, implementation bugs have often become de-facto, and now de-jure, standards, as content is often unintentionally written in ways that rely on them before they can be fixed.</i><p>Long story short, HTML and its satellites have quite a long history behind them, involving trade wars, religious battes and one or two revolutions (or coups, depending on your point of view)<p>I think the unique thing about the web &quot;stack&quot; is that for a long time it was the only platform usable and accessible by everyone and controlled by no single entity. This means there was a tremendous amount of people, companies and other entities that tried to influence it&#x27;s design. Because background compatibility is an absolute must, this lead to hacks accymulating and the whole language getting incredibly messy.<p>From what I know, there has been at least one approach to start with a &quot;clean slate&quot; and design a better framework - XHTML 2 - but it failed due to missing backwards compatibility and a lack of political support.<p>The organisation currently in charge publishes the &quot;HTML living standard&quot; (formerly known as HTML5) and has given up on most notions of cleanliness (short of declaring it an explicit non-goal) in favor of backwards compatibility and the ability to move fast.<p>[1] <a href="https:&#x2F;&#x2F;html.spec.whatwg.org&#x2F;multipage&#x2F;introduction.html#design-notes" rel="nofollow">https:&#x2F;&#x2F;html.spec.whatwg.org&#x2F;multipage&#x2F;introduction.html#des...</a>
mashlol超过 8 年前
You can&#x27;t really compare &quot;web development&quot; to &quot;application development&quot;. I think it&#x27;s more fair to compare a single web framework with a single native framework. The web ecosystem of frameworks is much larger, meaning there are far more options, much more to adapt to if changing projects. Switching from a well-written iOS codebase to a well-written Android codebase would be no different then switching to a well-written React codebase.<p>&gt; I&#x27;ve been doing some web development on a fairly long-lived and large code-base<p>Perhaps it&#x27;s just not a well written codebase. It&#x27;s extremely easy to write bad code for web, where perhaps it&#x27;s slightly harder to do for native development (although still very easily possible of course). It&#x27;s also very possible to write good maintainable code for both as well.<p>&gt; I&#x27;m not even talking about the fact that everything has to be stateless<p>It doesn&#x27;t have to be stateless. Take a look at React.<p>&gt; just the fact that it really feels like there&#x27;s no consistent way to do anything<p>That&#x27;s pretty much the same with application development. Perhaps not as much for Android&#x2F;iOS themselves since there is basically only one option for each of those. Even within those there are many many ways of doing everything. It&#x27;s up to everyone working on the codebase to keep things sane. That&#x27;s no different with web development.
flukus超过 8 年前
I think it got particularly crazy around the creation of npm&#x2F;node: <a href="https:&#x2F;&#x2F;www.commitstrip.com&#x2F;en&#x2F;2016&#x2F;05&#x2F;10&#x2F;a-moment-of-nostalgia&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.commitstrip.com&#x2F;en&#x2F;2016&#x2F;05&#x2F;10&#x2F;a-moment-of-nostal...</a> . This was an enabler for complexity to spiral out of control.
评论 #12477346 未加载
OliverJones超过 8 年前
With respect, at least part of your frustration comes from the &quot;curse of the installed base.&quot;<p>Long-lived software with real users in any language running on any platform becomes complex, and picks up strange-looking appendages. Sometimes those appendages are nasty hacks, and sometimes they are well-built. But they are, in most cases, necessary to the proper functioning of the software, and responsible for its success with its users.<p>That&#x27;s true of long-lived human work product in any discipline. Look at a municipal utility map sometime, and then consider that it is probably at least three decades out of date. That&#x27;s why utilities send out &quot;dig safe&quot; guys to construction sites. That&#x27;s why things go wrong in utility work after longtime engineers retire or die.<p>That being said, the capabilities in web browsers are definitely the utility company equivalent of of a pickup truck full of random bolts, pipes, wires, a shovel, a ladder, and a jackhammer. You can do many things badly with a web browser, and our ways of doing them badly have evolved over the past couple of decades.<p>I believe your frustration with aging web software is, in fact, a sign that web software has become generally useful to the population.
评论 #12478909 未加载
评论 #12478911 未加载
评论 #12481394 未加载
elg0nz超过 8 年前
&quot; In Richard Feynman’s popular book “Surely You’re Joking, Mr. Feynman!” he tells how during his college years he “often liked to play tricks on people”. Most of these tricks were designed to show how dumb people are. For example, in a mechanical drawing class at MIT where the students were taught to use a drawing instrument called a French curve (a curly piece of plastic for drawing smooth curves), Feynman informed the other students that “the French curve is made so that at the lowest point on each curve, no matter how you turn it, the tangent is horizontal”. He reports that the other students in the class were excited by this discovery, and began holding up their French curves and turning them in various ways, trying to verify that the curve was always horizontal at the lowest point. Feynman found this funny, because they had already taken calculus and supposedly learned that the derivative of the minimum of any curve is zero. (Of course, it’s also intuitively obvious: If a curve at a given point is not flat, the point is obviously not the minimum.) Feynman says “I don’t know what’s the matter with people: they don’t learn by understanding; they learn by some other way – by rote or something. Their knowledge is so fragile!” www.mathpages.com&#x2F;home&#x2F;kmath687&#x2F;kmath687.htm<p>&quot;Easy to begin, hard to master&quot; languages&#x2F;frameworks let you go very far in spite of your knowledge fragility. Some interesting topics to reduce this fragility are data structures, design patterns, software and hardware architecture and, distributed computing.<p>If I had a penny for every JR. Dev that thinks they can get around the CAP theorem...
评论 #12481674 未加载
评论 #12483041 未加载
BerislavLopac超过 8 年前
&gt; I&#x27;ve always found it quite easy to move up and down the stack<p>This is the most important point that most people overlook: the Web doesn&#x27;t have a single stack, even though we talk about &quot;full stack developers&quot; and similar. Web is your ultimate distributed system (which is why you have no other option but to make it static); you never develop a single application, but a multitude of applications often (usually, in fact) executing on systems you have next to no control over.<p>Just think of your quintessential &quot;Web page&quot;: a server prepares an HTML page which is then rendered in a browser. First, you have a server, which you rarely control (unless it physically sits on your desk&#x2F;rack, and even then you&#x27;re at mercy of your ISP). Second, even assuming the page was served correctly, it then arrives to another system which has OS&#x2F;browser&#x2F;display&#x2F;etc which you have absolutely no control over except for hoping that it adheres to all the standards you have adhered to when developing. Even if there is no client-side code (i.e. Javascript) to be executed, even the simplest HTML (as well as CSS) are instructions that need to be interpreted.<p>What you call &quot;hacks&quot; are essentially numerous solutions -- some good and others less so -- to inherent problems of distributed computing, working around the peculiarities of the underlying platforms (namely HTTP and TCP&#x2F;IP) to ensure reliability. Many things that are taken for granted in platform-specific development simply don&#x27;t exist here; as a reminder, take a look at <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fallacies_of_distributed_computing" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fallacies_of_distributed_compu...</a>
msoad超过 8 年前
I don&#x27;t know what are you referring to as hack on top of hacks? There are tons of big open source and closed source web based project that are easy to follow what&#x27;s going on and everything is well structured. Look at VSCode code base [1] or if you&#x27;re a Googler look at Google Photos source code.<p>People look at React and Webpack and all these small little modules that people put together to make something work and think that&#x27;s all the web is.<p>Although, I think React, webpack, Redux and all these little hacks are amazing for exploring what&#x27;s possible in web.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;vscode&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;vscode&#x2F;</a>
评论 #12477436 未加载
jorblumesea超过 8 年前
While I hate css, sort of like js and hate html layout, a lot of the problems come from accessibility. In that, it&#x27;s so accessible anyone can do &quot;web&quot;. This means you get non-engineers with no engineering background put into situations where thinking about things from an engineering perspective would really help and might produce actual workable solutions.<p>Like wtf is this:<p><a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;string.prototype.endswith" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;string.prototype.endswith</a> <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;ensure-string-endswith" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;ensure-string-endswith</a><p>str.slice, str.indexOf are standard lib. Adding another layer of complexity for basic string functions that could easily be done natively is very poor form. This kind of stuff happens all the time in the web world. There&#x27;s a layer of &quot;lack of competency&quot; bootstrapped on top of what I would consider a non-intuitive base.
评论 #12477470 未加载
评论 #12477475 未加载
评论 #12477558 未加载
27182818284超过 8 年前
Yes, yes, a thousand times yes. I completely agree with you.<p>John Carmack also agrees with you, though not about the web per se: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;ID_AA_Carmack&#x2F;status&#x2F;771749108780523520" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;ID_AA_Carmack&#x2F;status&#x2F;771749108780523520</a><p>This is how I feel too. If I had to put a finger on the root cause, it is because of the speed demanded. E.g., going back to the left-pad problems that happened in the Node ecosystem, I know lots of folks that know how to do that, but when speed comes up and they can just add a package, that&#x27;s what myself and others are often going to do.
kowdermeister超过 8 年前
&gt; Am I missing something?<p>Probably. Good folks to learn from.<p>&gt; Is it me resisting change?<p>Only you can tell, but client side web development is fine, thanks :)<p>&gt; Is web programming really that bad?<p>No, it&#x27;s doing fine, thanks for asking.<p>&gt; Is it really just that I need a new mental paradigm?<p>If you really want to take your time working with client side projects, then you need to relax a bit and just learn a bit more and play a bit more with these techs. Some you&#x27;ll hate, some you&#x27;ll love. That&#x27;s it.<p>I don&#x27;t really understand why is this hate against web development goes on HN. I&#x27;m building web apps for lots of years now and the major obstacles were never really the technology, but money or people.<p>Building UI-s in the browser with CSS is not a rocket science; a JS app is easily scalable to 100k lines of code; backend wise you need some good team and a sane PM who don&#x27;t want to immediately scale your app to Death Star level. Projects does get fucked from time to time, but if you picked your stack well, you&#x27;ll be fine. I admit it takes experience to identify the crap tools, but what profession doesn&#x27;t?
评论 #12478887 未加载
MrLeftHand超过 8 年前
I feel the same thing to be honest. As a mostly Backend Java guy I just have a hard time to get my head wrapped around the whole Frontend&#x2F;SPA thing and the multitude of frameworks, styles, tools and so on; just don&#x27;t help at all. It feels like everyone is reinventing the wheel constantly.<p>Right now I try to write a simple react SPA and I use more libraries as if I would have done it in a tomcat webapp with static html pages.<p>Documentation is relatively scarce or non-existent at all and in the end you end up looking at code on github. Hunting on Stackoverflow and blogs written by people and realize that there are 100+ ways to do the same thing.<p>Looking at code would be fine, but looking at Javascript it&#x27;s hard not to see how easy it is to write in different styles, which makes understanding the things harder. Also being in the middle of transitioning to ES6 makes it more complicated. Of course ES6 will be a big leap, but ES5 won&#x27;t go anywhere anytime soon because of backward compatibility. So you will end up with overlaps and weird code.<p>Sass definitely helps with css. React is a great way to develop nice SPA sites webapps.<p>I don&#x27;t know if the whole Frontend part is going in the right direction, but it will need some time to settle. For now it&#x27;s more fragmented then the Android platform. And it really feels like we are trying to put a lot of stuff on top of protocols, tools and standards which were never meant for this in the first place. We might end up having such big scripts loaded for a page, that it could have been just a thick client instead of a web page.<p>We threw away Java Apps, we threw away flash, we are throwing away jsp&#x2F;jsf, PHP, etc... And now we are recreating the same behavior with Javascript&#x2F;CSS&#x2F;HTML5. Soon it will be only Javascript and you literally won&#x27;t write not a single line HTML. (Well React already does that to be honest.)<p>So yeah, interesting times. And it&#x27;s hard to jump on this train whilst it&#x27;s moving so fast.
评论 #12480712 未加载
soheil超过 8 年前
I&#x27;m not sure what you mean by &quot;a new mental paradigm&quot;, the web is a complex system you cannot expect it to be completely reducible to a few simple constructs. You generalize the word backend programming as if it&#x27;s just one thing. There are hundreds of ways to program a backend system, you can choose from .NET to C&#x2F;C++ and rarely they are hack-free as you suggest that&#x27;s not even to mention the platforms they run on like for example BSD, Unix is a series of hacks on top of others, there are often 1000s of different ways to do the same thing.<p>I simply don&#x27;t buy your point that &quot;backend&quot; environments are somehow more elegant to work in and easier to reason about than the web.<p>You still have to decide which backend platform you choose and each has its own series of convoluted hacks associated with it.
hannob超过 8 年前
Yes.<p>I got this realization during a study project where I investigated the use of secure cookies (was 2009, it&#x27;s public [1]). It&#x27;s just one example, but you can find similar things everywhere.<p>Sessions in Web applications are realized using cookies, which is not a very good way, because once someone manages to steal your cookie your session management is broken. And there are plenty of ways to do that, because there is no good separation of the session from the rest of the functionality. Because both cookies and sessions weren&#x27;t in the design of http&#x2F;html before, they were a later addon that. So was javascript. So were many other things.<p>The thing you have to realize though: Things work. It&#x27;s been the most successful technology of the past decades. There is no point in moaning that things would be much nicer if we&#x27;d redesign them from scratch, because it isn&#x27;t going to happen.<p>[1] <a href="https:&#x2F;&#x2F;blog.hboeck.de&#x2F;archives&#x2F;681-Study-research-project-about-session-cookies,-SSL-and-session-hijacking.html" rel="nofollow">https:&#x2F;&#x2F;blog.hboeck.de&#x2F;archives&#x2F;681-Study-research-project-a...</a>
Svenskunganka超过 8 年前
I think the problem boils down to how the different browser vendors has treated web developers throughout the years, not giving them a consistent environment across the different browsers, not recognizing certain bugs so they&#x27;ve lived on and become un-fixable due to backwards compatibility.<p>Microsoft with their IE has been the biggest culprit in this, luckily they&#x27;ve taken Edge in the right direction and has really stepped up their game these last two years, but now Safari is at a crossroads and may just end up like the old IE if they take the wrong path. If only the large browser vendors could really, really get together and give us web developers a consistent environment without bullshit. Take Apple Safari for example, keeping Service Worker &quot;under consideration&quot; because the features it brings rivals native mobile apps which they make a lot of money from while all other &quot;large&quot; browser vendors has already started implementing the feature, some even ship it already.
aabajian超过 8 年前
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&#x27;re just now escaping: the era of browser quirks.<p>IMHO, GWT didn&#x27;t take off because of one reason: Its target demographic, web developers, do not have the same technical training as traditional computer scientists. What I mean by that is courses at places like General Assembly, CodeAcademy, and even KhanAcademy emphasize JavaScript&#x2F;CSS&#x2F;HTML paradigm. This triad makes it easy to create very nice looking website in very little time, but there&#x27;s little focus on code organization, software design, efficiency, etc. It&#x27;s much more of, &quot;Now we want this box to fade out when we click on this button, let&#x27;s see how we can write a function that makes this happen.&quot;
评论 #12480467 未加载
评论 #12480147 未加载
评论 #12479414 未加载
评论 #12479470 未加载
gfody超过 8 年前
There are billions of dollars made annually that depend on the web being a complicated clusterfuck of spaghetti. It&#x27;s all about tracking and targeted advertising that wouldn&#x27;t be possible if a random website couldn&#x27;t indirectly load a script that indirectly loads a script that loads an image that indirectly drops cookies from a thousand different domains based on a hundred things just sniffed from your browser and the current marketing efforts of thousands of companies bidding for impressions or clicks or whatever.<p>My pet theory is that commercial politicking is at the heart of everything wrong with the web. Apple, Google, Microsoft, and Mozilla basically sabotaging initiative after initiative for decades trying to fuck each other over in the short term and long term. Like why didn&#x27;t xhtml catch on, why did IE never support xpath, where did flash go, what happened to silverlight, there are hundreds of &quot;how did we get here?&quot; stories. And I imagine for every minor decision that had far reaching repercussions on web development there was a highly strategic debate at each respective company with high level executives weighing in on technical subjects they had no business weighing in on with shit like &quot;if we support this simple protocol we risk losing our control over this other simple protocol&quot;. Basically a bunch of cut throat executives playing statecraft with their browsers.
评论 #12525662 未加载
intrasight超过 8 年前
Sometimes I ask myself the question by doing this thought experiment. If we encountered a more advanced sentient species that writes code, would they say &quot;Yeah, we went through that html&#x2F;css&#x2F;js phase of development, and in fact all sentient species do so. We got some good mileage out of it, and it was a total hack for a generation (we refer to that time as the lost generation), but it evolved into our current &#x27;System X&#x27; for user-facing app development. Due to the Prime Directive, we can&#x27;t show you what &#x27;System X&#x27; entails. You&#x27;ll just have to evolve there yourselves.&quot;<p>Or, would they say &quot;You guys are bloody idiots. Come back when you shopped at the galactic clue store.&quot;
评论 #12477538 未加载
joemi超过 8 年前
There are a lot of articles out there arguing that the web wasn&#x27;t designed with modern web apps in mind, and that that&#x27;s a source of a lot of strife, so you&#x27;re not alone in this feeling. But there&#x27;s also a lot of articles that argue that that even though it wasn&#x27;t designed with this kind of use in mind, that there are ways it can work well.<p>Out of curiosity, what&#x27;s your stack look like? Not all stacks (or components of the stacks) are created equal, by a long shot. Some devs love to try out brand new or new-ish frameworks&#x2F;dbs&#x2F;etc that haven&#x27;t got all the kinks worked out yet, simply because it&#x27;s the new hotness.
Beltiras超过 8 年前
I think you come to the conclusion because necessity is the mother of invention. Web development is often done in a high-pressure environment with great focus put on churning out features. This leads to the hacks-on-hacks mentality because the needs of the day trump any sort of coherent principle emerging from thoughtful work on the codebase.<p>I resided over a medium sized custom CMS that was going through changes on all levels. I tried my best to keep it pretty. Fact it was made with Python made it easier for me. Due to that I was quick to find aesthetics to guide my coding. One of the &quot;ugly hacks&quot; actually turned out to save some 50 ms of time on each request. That was significant enough for me to go find a deeper principle for it and implement it in a nice, clean way.<p>Hacks-on-hacks is SNAFU for web development. Just remember to demand time to refactor and clean up once in a while, otherwise you&#x27;ll end up shoveling shit from one pile to the next and never managing to vacate it.
BjoernKW超过 8 年前
Isn&#x27;t everything? With web programming that&#x27;s very much a feature, not a bug. You could say that Perl&#x27;s - the first major web back-end programming language - TIMTOWTDI paradigm is a feature of the web itself.<p>MFC, Swing, Cocoa, Qt all offer more or less consistent experiences but none of those is as flexible as what you get with the web, which also is a feature, not a bug, because with a certain OS you also want a somewhat consistent, vendor-independent UI &#x2F; UX across applications.<p>That said, if you aim for consistency, there are widely used frameworks and tools like Bootstrap, Modernizr, jQuery or Angular that can help you in that regard as well.
评论 #12477389 未加载
BinaryIdiot超过 8 年前
I&#x27;ve done front end work for nearly a decade now. You&#x27;re right and I think frameworks are a big part of the issue.<p>Looking at how to do something on the web there is a different way to do it in React, Ember, Angular, jQuery UI, Bootstrap, ExtJS, and about 50 more slightly lesser known frameworks. They don&#x27;t interoperate well <i>at all</i>. Yes it all boils down to HTML &#x2F; JavaScript in the end so there is always an integration point but try writing a component that integrates well in even 2-3 of frameworks.<p>Honestly if more people taught solid coding structures and the DOM API (which, yes it&#x27;s awkward but with the features HTML 5 brought in plus well structured code it&#x27;s not <i>that bad</i>) you could have a smaller, handful ways of doing something properly <i>and</i> you could even share components far easier.<p>Granted frameworks are not the only problem. But, in my opinion, they&#x27;ve severely splintered the way the web is developed.
ng12超过 8 年前
I don&#x27;t know that they&#x27;re all &quot;horrible&quot; hacks, but yes. We still generally don&#x27;t know the best way to build a complicated website. We can&#x27;t even agree on the simple stuff -- for example Angular2 and React, two of the hottest frameworks, pursue wildly different philosophies.<p>I think it&#x27;s exciting. It keeps me motivated to learn new things, and really think about the code I&#x27;m writing.
评论 #12477759 未加载
vikaveri超过 8 年前
Web development is like the scene from Indiana Jones and the Last Crusade. You get to pick your poison and there are a lot of people who will choose poorly. Doesn&#x27;t matter how good you are, chances are, on occasion, you&#x27;ll choose poorly as well.<p>There&#x27;s no point trying to read and understand every library and framework that comes out. HN has half a dozen interesting ones I skim over each week because what you need to know is what&#x27;s out there, what&#x27;s been done, so when you come across a problem you don&#x27;t have the tools for, you can come back and choose the tool that best fulfills the requirements you have at that moment.<p>And those requirements will change from project to project. There&#x27;s no cure-it-all. Expect to switch frameworks or libraries very often. You probably wont have time to learn all the intricacies of a framework before something else is more suitable for your needs.<p>It&#x27;s not impossible or required to write bad code and have bad design, but it&#x27;s easy to shoot yourself in the foot when you don&#x27;t know what you&#x27;re doing. You will see lot of bad design and poor code though, there are a lot of coders who are starting out with web development because it&#x27;s an easy place to start with.<p>Sometimes you need just a spoon and sometimes you need a fleet of excavators and the hard part is knowing when to use what.
TickleSteve超过 8 年前
Yes (simple answer).<p>but really, its less &quot;hacks on hacks&quot; and more &quot;unneeded abstractions on unneeded abstractions&quot;.<p>The inefficiency of modern web-stacks continues to absolutely astound me.<p>When people tout the &#x27;efficiency&#x27; of language A against the equivalent C as being &quot;less than 2x&quot;...<p>jeez... that means you&#x27;re throwing away double the power that you need to. That means you&#x27;ve got <i>double</i> the number of air-conditioners cooling your server-room. <i>double</i> the power bill, etc...<p>&lt;&#x2F;rant&gt;
评论 #12478742 未加载
nostrebored超过 8 年前
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?<p>WebKit is great, but any attempt to reform the competing browser shitshow reminds me of that xkcd comic about competing standards: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a><p>(former web developer -- get out while you have your sanity)
评论 #12477773 未加载
评论 #12477291 未加载
combatentropy超过 8 年前
<p><pre><code> &gt; a fairly long-lived and large code-base </code></pre> Such could be spaghetti on any platform. To understand web programming, I wouldn&#x27;t start with something big and old. I&#x27;ve been doing web programming for more than a decade, and I still don&#x27;t get the majority of web frameworks. Start instead with the basics, and work your way up:<p>1. HTML. Don&#x27;t view the source of websites and web apps to understand HTML. Read a good book or tutorial. HTML Dog is a good one.<p>2. CSS. Likewise.<p>3. JavaScript. Definitely don&#x27;t try to learn JavaScript by viewing source either. Instead, maybe HTML Dog. There&#x27;s also Douglas Crockford&#x27;s _JavaScript: The Good Parts_ and David Flanagan&#x27;s masterpiece, _JavaScript: The Definitive Guide_. I don&#x27;t know how I would have ever understood JavaScript if I had not taken the months to read Flanagan&#x27;s book cover to cover.<p>That takes care of the client side. For the server side, it should come much more easily. Basically you have a database, like I&#x27;m sure you&#x27;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.<p>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&#x27;ll feel more comfortable with how simple it really is.
narrator超过 8 年前
&gt;Can you recommend any good resources to help me orient my mind to this new way of thinking?<p>The thing about web frontend development is that it suffered from the browser wars and having to appeal to amateur developers. Amateur developers love &quot;Worse is Better&quot;[1]. Basically sacrifice all consistency in favor of simplicity and getting started quickly. &quot;Worse is Better&quot; makes things simple to the point of making ugly hacks for certain situations that don&#x27;t fit that extreme focus on simplicity.<p>The browser wars made everything horribly inconsistent. Microsoft&#x27;s strategy was to make the most broken non-standard code possible automatically work and everyone had to emulate that.<p>The most clean frontend development I&#x27;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.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Worse_is_better" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Worse_is_better</a><p>Edit: Replaced the JWZ URL with wikipedia. Apparently JWZ has some anti-hacker news redirect code on his site.
评论 #12477711 未加载
评论 #12477502 未加载
评论 #12477489 未加载
Myrth超过 8 年前
I think it feels hacky because it is, and it&#x27;s natural. And by natural I mean this is how spontaneous complex systems evolve. Internet is a result of half of a century of millions of people&#x27;s contributions for different and often opposing goals and priorities. For other examples of hackiness take a look at other complex natural processes, like multicellular living creatures and ecosystem in general.
评论 #12477388 未加载
isoos超过 8 年前
The best analogy I&#x27;ve seen with regard to code health is that software is not built, not engineered, rather it is grown. Depending on the technology of choice, your garden may adopt to different climates, requires different nutrients, and pleases different audience (or achieves different goals).<p>From that perspective, JavaScript is a garden where once planted, you can&#x27;t change anything in your garden, and pretty soon it becomes inflexible to build upon old stuff.<p>The more tools you have, the better of you can get. E.g. TypeScript, and especially Dart help a lot with tooling (and making gardening fun again). What you end up with is isolated components that encapsulate their own code, HTML template and CSS rules. It may be called web component, angular or one of its many competitor, but eventually that is what brings you sanity.<p>And speaking of sanity: I&#x27;ve found that &quot;the current hype&quot; is almost always broken, half-baked, and lacks proper engineering practices. Go figure why... Use the tool that you enjoy working with and does the job well, and ignore the rest.
kuon超过 8 年前
I think one reason is because there are two kinds of web development.<p>Website dev and web app dev.<p>I don&#x27;t think they are mutually exclusive, but website dev is about styling and navigating into documents. It&#x27;s stateless and the variety of content is unlimited. I don&#x27;t think there is a &quot;problem&quot; here, it works, has good tools for what it has to do.<p>On the other hand, there is web app dev, and app dev is messy at present. My guess is that is lacks governance, it&#x27;s not necessarily a bad thing, but it means things are taking time and must prove themselves to gain traction and become standards.<p>But yeah, doing something like a calendar input, with really perfect behavior, where you can navigate the calendar with the keyboard if focused, that is accessible, works on all device… is insanely hard and not solved by the platform yet, so everybody try something different.<p>Also, a lot of people that are more authors than programmers are &quot;hacking&quot; &quot;app like&quot; functionalities into their website, and it can get messy very quickly. No pun intended.
brlewis超过 8 年前
<i>Lately I&#x27;ve been doing some web development on a fairly long-lived and large code-base</i><p>Therein lies the problem. I&#x27;ve been doing web development for 22 years and it&#x27;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.<p>Web programming on your typical long-lived large code base really is that bad, but start from scratch with something React-like and you&#x27;ll have a much better experience.
评论 #12480531 未加载
TheAceOfHearts超过 8 年前
It&#x27;s inconsistent, but it&#x27;s getting better. The tooling has been drastically improving over the last few years.<p>There&#x27;s no &quot;one true way&quot; of doing stuff and the barrier to entry is low, which causes lots of different ecosystems to evolve. The browser vendors are trying to focus more on lower-level features, which the community is expected to use in order to build better abstractions.<p>I don&#x27;t think it&#x27;s worse than other platforms.<p>It really depends on what you&#x27;re building. If you&#x27;re making something that&#x27;s largely document-focused, it&#x27;s extremely easy. But as you start building more sophisticated applications, the complexity increases.
socmag超过 8 年前
Yes it is awful.<p>How people manage to build applications given the festering pile of rubber bands, glue and fish heads that we call web development platforms these days is beyond me.<p>There was a time when even I could build a website. Then I stepped away for a few years to do other stuff and came back to witness in complete horror where things are now. Let&#x27;s be frank, the tooling is abysmal.<p>I&#x27;ve been taking a look at Polymer, Dart and Flutter recently.<p>Looking at the goals of those projects I&#x27;d say that reading between the lines, even the likes of Google understand that something has to change.
cloakandswagger超过 8 年前
The internet as a whole is one giant, hacked together system. There&#x27;s no doubt that, with a magic reset button, we could build an internet that is vastly more secure, efficient and reliable than the current one.<p>But that&#x27;s the nature of an emergent, distributed technology like the internet. Once the concept was born we ran with what we had, and once adoption hit a certain point it became impossible to start over again and do it correctly. I see it as an innate challenge that comes with the domain, like EM interference for electrical engineering.
评论 #12477854 未加载
freyr超过 8 年前
Yes. Web programming is a mess. It&#x27;s layers and layers of half-baked solutions, each patching deficiencies in the previous layer while introducing new deficiencies. It&#x27;s a convoluted Rune Goldbergian contraption, attempting to make a general application framework out technologies originally designed to display hypertext.<p>The individual parts make sense once you&#x27;re familiar with them. Some are even designed by conscientious and competent people. But the feeling that, taken together, it&#x27;s an ugly hack is inescapable.
unclebucknasty超过 8 年前
Damn. If I didn&#x27;t know better, I&#x27;d have thought I&#x27;d written this myself while in an Ambien-induced fugue state.<p>This is exactly my feeling and much my own history. I think the intensity of your pain can be felt most acutely by those who once knew a saner world of software development.<p>For those who came of age in this era of Javascript hacks, framework of the day, standard of the week, and separate open source tool for <i>every single task</i> an app must perform, I think it is simply normal.<p>I say this because after several years applying my craft to my own business in the manner of my choosing, I have recently returned to Organized Development Land. When I read the code or a module is explained to me, all I can think is &quot;are you effin&#x27; kidding me?&quot; But I look around and everyone else has a straight face.<p>If you&#x27;ve stayed in the industry during this evolution, you have probably had moments of frustration or confusion wrought by this change, but have now had a full WTF epiphany--likely induced while simply trying to get something done for the hundredth time, that should&#x27;ve been relatively straightforward.<p>Mainstream software development is no longer about logic, algorithms, creativity, and design. It&#x27;s about trying to glue together a hodge podge of disparate crap and trying to make it work. And, for the artisans of old, it can feel like soul-crushing assembly-line work.
micro_softy超过 8 年前
Do web developers find ways to create work for themselves?<p>You allude to it below when you say &quot;zillions of hours&quot;.<p>There is a significant amount of money moving through the &quot;web development industry&quot;.<p>People are getting <i>paid</i> to write things that suck.<p>The internet actually has made leaps and bounds in terms of what can be delivered over it to the masses.<p>But the &quot;web&quot; has become a cesspool of redirects, overstuffed headers and pages crammed with beacons, ad server links and ad-related Javascript, accessible through ad-sales-company-sponsored software (&quot;web browsers&quot;) to run the ad-related Javascript.<p>If and when users grow tired of web advertising, the entire system is a risk of a serious correction.<p>Again, significant and increasingly larger sums of money are moving through the web ad and user data collection cesspool so no one really cares how poor the quality of the &quot;content&quot; becomes.<p>And you want to learn to orient your mind to this &quot;new way of thinking&quot;?<p>Maybe you are not resisting change. Maybe you are resisting stupidity. Your time may be better spent focusing on backend development. Today&#x27;s &quot;backend&quot; may be tomorrow&#x27;s frontend.<p>All that &quot;content&quot; can easily be delivered without a single line of Javascript and without using search-engine-ad-sales-company-sponsored software.
jacquesm超过 8 年前
Definitely yes. I&#x27;m on the sidelines until things will settle down into something that makes more sense and if it doesn&#x27;t then I won&#x27;t be doing any web development.<p>Software is such a huge field there are a ton of interesting challenges outside of the web and the current mess does absolutely nothing to keep me interested. It&#x27;s a veritable tower of Babel without a clear sense of direction or longevity.
duncan_bayne超过 8 年前
I think all programming is, but Web programming is _particularly_ that way.<p>The least bad stack I&#x27;ve ever used is Reagent ( <a href="https:&#x2F;&#x2F;github.com&#x2F;reagent-project&#x2F;reagent" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reagent-project&#x2F;reagent</a> ) - a Clojurescript library for React. Perhaps that&#x27;s just _adding_ layers of hackery, but I found it made sense.
richardw超过 8 年前
I use GWT for anything serious. It&#x27;s not what the cool kids like, but it feels super-solid compared to the flake that I experience when working with a heap&#x27;o JS libs. And debugging it years later is awesome (barring a couple gotchas) because it makes sense.<p>I&#x27;ve always thought GWT has a crazy learning curve until we did a project in Angular2 on top of ASP.net core, using a customer-selected template that required tons of JS fun, with random CSS class names that have zero obvious semantic benefit so you have to look everything up. Not even Typescript could save the feeling that we were building a house of cards in a strong breeze. Same with Django + JS. Just felt too scripty for me.<p>I don&#x27;t like leaky abstractions but honestly the modern web fundamentally forces you to use them for anything vaguely complex. It&#x27;s not getting easier, it&#x27;s getting much, much harder. GWT at least gives me a way to trade off complexity for a clunky but solid language, and I get to reuse code on the front and back ends.
评论 #12478634 未加载
nallerooth超过 8 年前
The web itself as we know it, was born from a bunch of hacks clobbered together by people who thought that the most important part of development was to &quot;ship code&quot;. Features like images in browsers, or JavaScript, were designed and implemented in very short amounts of time and then all the cool features were copied by other browsers. With such a foundation, I think we can establish that modern web development indeed is a &quot;hacks on hacks&quot; thing.<p>A lot of people still believe that software development is all about &quot;shipping code&quot;. And since many developers work alone, or in small teams - things like architecture, knowledge of web interfaces&#x2F;APIs, etc. may not be something the developers are familiar with. Then the project becomes popular, which makes it harder to clean stuff up without breaking code depending on your project.<p>New developers hearing about companies embracing stuff like &quot;Break stuff - ship code&quot; isn&#x27;t really helping them focus on quality either.
toddan超过 8 年前
This is why i find it so much fun to do applications on windows with .net you only need to know one language C# or VB.net and then you are set. You can create anything with just this, of course it will only work on windows but i dont mind, it just such a pleasure to only have one toolset and then just focus on the task at hand.
otabdeveloper超过 8 年前
All of human civilization is a &#x27;series of hacks on hacks&#x27;.
评论 #12479590 未加载
EugeneOZ超过 8 年前
Some parts of web-dev are really chaotic right now, but other parts can be very well-organized, same as server-side code.<p>For example, you need to compile all of your es6&#x2F;es7&#x2F;typescript code to JS (because nobody will write in pure ES5 nowadays), minify and concatenate resulting files - this part is very chaotic. But you need to touch it not so often.<p>You also need to write unit-tests. Tests itself will take 10% of their configuration code, it&#x27;s very annoying also.<p>But when you&#x27;ll write e2e tests, everything will be much more clean.<p>Main part, JS code (I recommend TypeScript) can be organized by same rules you use on the server.<p>Frameworks: Angular 2 is closer to Java enterprise apps (with all good and bad parts of it), React and jQuery are not frameworks and if your codebase is built on jQuery - bad news, it will be mostly spaghetti-code.
webXL超过 8 年前
Ah, yes. Another round of grumpy &#x27;ol &quot;why can&#x27;t I pick&#x2F;control every aspect of my application environment in the languages I love&quot; developer whining. I swear some people just love saying &quot;hacks on top of hacks&quot;. It&#x27;s the new pejorative of our industry, despite the unparalleled success of what it&#x27;s intended to dismiss. The hacky-ness we&#x27;re observing is just an evolutionary byproduct of the &quot;power vacuum&quot; of software decentralization and democratization. Yes, it&#x27;s inefficient and ugly in some places, but it&#x27;s an amazingly practical way to distribute software. Just remember your perfect system is only perfect for you or your financials. To state otherwise is sophomoric and unscientific.
评论 #12481732 未加载
thrilleratplay超过 8 年前
Yes&#x2F;no. Code is developing faster than standards update:<p>HTML - HTML 4.0.1 -&gt; HTML5 (14 years)<p>CSS3 - in development since 1998<p>JS - ECMAScript 3 (1999) -&gt; ECMAScript 5 (2009) -&gt; ECMAScript 6 (2015...ish <a href="http:&#x2F;&#x2F;kangax.github.io&#x2F;compat-table&#x2F;es6&#x2F;" rel="nofollow">http:&#x2F;&#x2F;kangax.github.io&#x2F;compat-table&#x2F;es6&#x2F;</a>)<p>I think web development is a lot like Perl. It is flexable enough for anyone to write something simple and quick but creating a large maintainable project takes a lot of discipline.<p>I use a series of linters, style guides and naming conventions to keep from shooting myself in the foot but still will need to go back and clean up from time to time.
crearo超过 8 年前
I felt the exact same thing when I started webdev after 3 years of app dev and a little bit of REST APIs (and backend) using python flask. For me JS, and all frameworks built using JS felt like attempts at revival of something that should have long died. Every new framework gives JS lovers (honestly no offence) a little bit of hope and adds a year or two to its survival. For a long time, I felt JS was a hack on top of a series of hacks!<p>I&#x27;ve just come to accept it now. The reason you&#x27;re disliking it is probably because of its extreme hit and trial nature - unlike appdev which is more fluid and consistent.
ilaksh超过 8 年前
My take on this is that backend developers have always been at odds with frontend developers in terms of being given larger salaries than frontend while not having to keep up with new UI technologies and simultaneously downplaying the skills of the front end programmers.<p>So now, when you have to learn about the web platform since you just cannot ignore it anymore, you are feeling pretty overwhelmed, and can&#x27;t help yourself -- you fall back on what you know, which is to shit on the skills of front-end developers.<p>I say this as someone who has done front, back, database, ops, on web-based and desktop stacks.
评论 #12481801 未加载
评论 #12477630 未加载
sp527超过 8 年前
What you&#x27;re witnessing is the migration of complexity to the frontend. It&#x27;s becoming very difficult to find a backend problem that doesn&#x27;t have a well-defined, generally accepted solution and accompanying FOSS that you would be stupid (or even borderline criminally negligent) to ignore. In fact, full-stack programming in general is boring enough that I welcome anything that stirs the pot a bit. That said, having tried at one time or another PM, management, and sales: programming is the worst monetizable career option, except for all the others.
评论 #12477492 未加载
tekacs超过 8 年前
I&#x27;m more unnerved by how few maintainers so many critical&#x2F;core open source projects&#x2F;libraries have, whether in web or otherwise.<p>However high our project or company&#x27;s bus factor gets, it&#x27;s concerning to realise that the framework or critical library underlying has a bus factor close to one. We can certainly adopt it, but that&#x27;s folding in a lot of new complexity. o_O<p>This applies irrespective of the language, incidentally - it&#x27;s often true in Java&#x2F;Python&#x2F;Scala even as in JavaScript&#x2F;npm, as much as people like to bash on the latter.
popopopo超过 8 年前
weird. commenters seem to be either new web devs, or non-web devs at all judging from comments and cries.<p>web development is as hard as any other development environment. you must know a lot of stuff, hacks ARE NOT mandatory at all and it is not as bad as people tell you.<p>maybe you just work with terrible base code is the answer?
kafkaesq超过 8 年前
Was it ever anything different?<p>From the very beginning† -- you know, back to the <i>&lt;img&gt;</i> tag, HTTP 1.0 -- it was always a series of shrewd tradeoffs (a.k.a. &quot;hacks&quot;) in favor of what <i>can be put in front of people now</i> instead of what might take another 5-8 years of IETF meetings and mailing lists debates to hash out.<p>† Referring to &quot;the web&quot; as such; not &quot;the internet&quot;, for which the initial design choices, while still hackish in their own way, were arrived at in ways decidedly less brutish and expedient.
SZJX超过 8 年前
Reading through all these comments, I feel there&#x27;s one salient question left unanswered: What&#x27;s the alternative, then, under such a divisive landscape of various OS and standards? Surely it&#x27;s infeasible for the vast majority to develop native applications for each and every platform out there, for everything we want to do? The current web application solutions are the best people have come up with. If they&#x27;re indeed so rubbish and we&#x27;re in a &quot;dark age&quot;, then why hasn&#x27;t an alternative triumphed? It&#x27;s not like companies with money and might haven&#x27;t tried over all these decades, they just simply didn&#x27;t succeed. There is a reason why web application is being so widely adopted, and attributing all to &quot;errors and flukes&quot; makes no sense.<p>Either you unite all the platforms to make them one, which I&#x27;d rather not for diversity&#x27;s sake, or you accept the fact that there has to be something out there that supports all of them, which isn&#x27;t going to be an easy feat no matter what.<p>By the way, I surely also hate CSS, and JS to an extent, but my experience programming UI in other platforms haven&#x27;t been exactly pain-free either. The hate might have been a bit overblown. The nature of computer programming in its current form just simply fits badly with UI design. That&#x27;s the fact.
brwr超过 8 年前
Web developer is not ideal. That is more of a people issue than it is a technology issue.<p>Whatever our collective gripes about JavaScript, HTML, and CSS, we all know how to use them. We know how to handle cross-browser compatibility and different screen sizes. What we need to do a better job at -- and I think this is the root of the problem you&#x27;re describing -- is pushing back on businesses wanting to ship features too quickly.<p>We&#x27;ve all been at places where no one values good work on the client. The C-levels want to get things out the door as quickly as possible. They complain that our work has bugs and we tell them &quot;Well that&#x27;s what you get for telling me I had 3 days.&quot;<p>Because of this heat, front-end engineers rarely engineer their software. As you put it, they hack it together on top of libraries that have been hacked together by others. The solution is to take the time required to do things correctly. That means testing. That means not shipping features so we have time to refactor and upgrade frameworks. That means paying attention to performance and developing tools for debugging errors in production. If we want web development to get better, these things can&#x27;t be afterthoughts. They must be considered before we say something is &quot;done&quot; and ship it to production.
endgame超过 8 年前
<a href="http:&#x2F;&#x2F;www.stilldrinking.org&#x2F;programming-sucks" rel="nofollow">http:&#x2F;&#x2F;www.stilldrinking.org&#x2F;programming-sucks</a>
评论 #12477473 未加载
altern8tif超过 8 年前
One thing I haven&#x27;t seen mentioned is that while the developer experience is getting more complex, the user experience is getting better and better.<p>That, in my opinion, makes all the messiness worth it. I&#x27;m not saying that there&#x27;s nothing wrong with the state of web dev now, but it&#x27;s not without reason that we are here today.<p>Remember the days of table-based layouts in HTML? <i>shudder</i>
评论 #12478402 未加载
xorgar831超过 8 年前
I&#x27;d love to know too, are there any frameworks that are at least more straightforward than React and Angular? One where you&#x27;re not passing anonymous functions into functions with all sorts of confusing syntaxes, where you can just express what you want to do without having balance three types of punctuation that require the shift key to type.
benoror超过 8 年前
Hackish? yeah!, immature? still yes!, sucks? hell no!<p>I believe the very nature of the web, and the internet itself, is a story of a hack onto another hack.<p>Think about the first internet communication mediums, protocols, etc. They were all &quot;hackish&quot; solutions. Internet over the telephone landline? why not? change it to the cable TV infrastructure? Sure!<p>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&#x27;s a mess and hasn&#x27;t been consolidated, yet.<p>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.<p>Compare that kind of ecosystem with the more closed less-hackish ecosystems like Windows&#x2F;OS X, Android&#x2F;iOS app development, you can see the difference.<p>Just my two cents :)
david927超过 8 年前
We&#x27;re a smart industry, but we&#x27;re not a wise industry.<p>We focus on solving tactical problems, ignoring the mountains of technical debt that are created from it, and that it leaves the strategic problem worse. We will do this because we need the solution today, not tomorrow.<p>We can elevate out of this when we&#x27;re ready, when we say &quot;enough is enough.&quot;
dandv超过 8 年前
Yes, the web was meant for building <i>pages</i>, not <i>applications</i>, and that shows. HTML and CSS are horrible at laying out apps (even with flexbox). Which is why using front-end libraries is critical. Have a look at <a href="https:&#x2F;&#x2F;webix.com" rel="nofollow">https:&#x2F;&#x2F;webix.com</a> - it&#x27;s amazing how expressive that widgets library is: 10 lines of code for a master-detail tree+grid layout.<p>As for the server side and the client-server communication, nothing really beats Meteor - <a href="https:&#x2F;&#x2F;wiki.dandascalescu.com&#x2F;essays&#x2F;why_meteor" rel="nofollow">https:&#x2F;&#x2F;wiki.dandascalescu.com&#x2F;essays&#x2F;why_meteor</a>. It removes a lot of the paradox of choice, while still letting you swap components out when you&#x27;re ready (e.g. you can use PostgreSQL instead of Mongo, or React instead of Meteor&#x27;s default view library).
评论 #12483597 未加载
jorgeleo超过 8 年前
That is because Html is a more readable form of RTF, but still a document descriptor none the less. and hack in with javascript.<p>If the world had settle in Word format, instead of javascript we will be using VBA, and everything else will look exactly the same.<p>I think what we really need is a web app environment, with programming as the first though
achen2345超过 8 年前
I have been working with web technologies directly (not through Java or some other language) full time for almost 20 years. Here is the problem:<p>* In the 90s sloppy was awesome. The web is driven by marketing interests and not by technology interests. The name of the game back then was &quot;get big fast&quot;. You need incompetent developers (many of them) to work in the technologies for extremely low pay, which means the technology must be extremely forgiving. The technologies tolerate a tremendous amount of sloppiness and so become sloppy themselves.<p>* The education around web technologies is deplorable. There are a couple of reasons for this. The technology is moving, growing, and enhancing rapidly making it hard to keep up with. Because there is sloppiness baked in its hard for people to immediately jump in and know the best approaches and avoid the pitfalls. Web technologies are generally considered incompetent toys (in academia) compared to more entrenched technologies like C++ and its spawn (C# and Java).<p>* Don&#x27;t break the web. This means old broken approaches (the sloppiness) will continue to be supported forever even after they are deprecated and killed. We know what the best approaches are, but making the technologies more strict and unforgiving is the enemy of all marketing and shames incompetent developers (most of them). It is one thing if your language of choice fails and yells at you during a build process, but it is something different when this happens in production because web technologies don&#x27;t require a build process.<p>You can safely ignore the technology excuses from many of the replies on here. These opinions come from people who learn web technologies only after learning something else (unrelated) first. For example, JavaScript is not Java, and if you look at it through a Java lens it will be incompetent for all kinds of reasons, but really the developer is just wishing they were still writing in Java. JavaScript will never be language x, but that isn&#x27;t a valid reason to call it incompetent.
SimeVidas超过 8 年前
The web platform is disorganized and has many missing pieces. It has also grown quite a lot in the last couple of years, so it’s virtually impossible to understand all of it. As long as you’re disciplined about learning from the relevant blogs, it will “become better” (but it may take months).
评论 #12477415 未加载
sheriffderek超过 8 年前
I suggest you choose to fall in love with Ember.js. She is the prettiest girl in your small town and she&#x27;s really friendly. Start calling yourself a programmer instead of a coder - and help move Ember toward being, not just a framework, but an SDK for the web. Everyone can complain all they want about CSS and how it&#x27;s broken etc, but no one has come up with a better solution. It&#x27;s not the dark ages... in fact, it&#x27;s the best time in web development so far. Developers haven&#x27;t had to be &#x27;designers&#x27; in the way they are being forced to now - with variable screen-size, and alternate UI patterns for each. HTML in little dynamic templates, variables for CSS preprocessors, ES6, and modular JS patterns. Things are wonderful. +1 for a new mental paradigm.
Shorel超过 8 年前
In my work I can be writing C++, or PHP or Javascript, depending on what part of the stack I&#x27;m working on.<p>C++ bugs are a bit hard to find, because the error messages are not very useful, so I launch the debugger, do a stack trace that fills the screen with arcane texts, then open the relevant source file in the line pointed by the debugger, and after about a minute of staring at that line and thinking, the bug is fixed.<p>In comparison to modern C++, JavaScript issues are complex beasts that can eat all your morning and give nothing in return. And then you test with another browser and it starts all over again.<p>Even so, some things like detecting the decimal separator supported by your operating system work in IE and Mozilla but were never implemented in Chrome, so you can&#x27;t never really fix that &#x27;bug&#x27;.
flushandforget超过 8 年前
I think what saddens me with web programming, is constant rewrites of the same old projects, that pretty much do the same thing. As a community we&#x27;d be better to focus on a few core APIs like a web shop or a booking app.<p>A church or school could have a common underlying built platform. Where functions of outfits are unified, we could drop in one size fits all solutions.<p>In England (UK) you have about 24 thousand schools these could be aided&#x2F;driven by a few competing platforms. Charities and small shops likewise.<p>Platform constraints can also help. Having fixed html, perhaps would let designers just swap out CSS and imagery - job done.<p>Much web work is a brain drain, and a lot of good talent in my eyes is being squandered on petty engineering problems, when there is still a world out there that needs putting right.
评论 #12477780 未加载
ankurdhama超过 8 年前
Any software, no matter what type, that evolves over time will become a series of hacks on hacks. The more the frequency of evolution is the more hacks will be there. Unfortunately the frequency of evolution in any web app is way way too much then other kinds of applications.
buro9超过 8 年前
Everything is simple.<p>There is just a lot of it.<p>That&#x27;s pretty much my view of internet and web technologies over time. It all did work, it all continues to work, to address security&#x2F;performance&#x2F;convenience we collectively add a few more little simple features&#x2F;workarounds&#x2F;quirks.<p>But ultimately the perception of the hackery of it all really stems from:<p>1. Quantity. There&#x27;s a lot of stuff, it all works to some definition of &quot;works&quot; and there is typically more than one way of doing something.<p>2. Quality. When things are made, they are made for that time. As time goes by we can more clearly see the ambiguity of something, or the incompleteness of a feature, but by then it&#x27;s too late and it&#x27;s set in stone, our fix is usually to add something new (see #1).
nigelg超过 8 年前
This thread is just a big circle jerk of non web-developers hating on web development.<p>Minimize you dependencies, organize your code into easy-to-fit-in-your-head, single-responsibility modules. Write a simpler solution instead of including another 100kb minified mess.<p>Someone else said it, but I&#x27;ll repeat it: systems scale, languages don&#x27;t. Javascript can be as good a language as any if you use it correctly. People bitch about the footguns but don&#x27;t take the time to design their systems correctly. Yeah, Javascript fucking sucks when you write 10k lines of incoherent JQuery-soup in a single index.js file that provides all the functionality of your shitty asp.net page from 2001. Well no shit? You can write garbage in any language.<p>&#x2F;rant
Fannon超过 8 年前
Yes, the web is a very messy place. Maybe a kind of wild west of programming practices?<p>But it&#x27;s also a place where you can do a lot of things that no one has thought before. There are not many rules and a wide diversity of approaches. The web platform never had many of those approaches (e.g. complex web applications) in mind when it was created. It works somehow, anyhow. It&#x27;s chaotic, yes, but also flexible and full of freedom.<p>To stay sane in this world, you have to voluntarily and deliberatly (!) reduce this freedom and create yourself some small sane pockets that you understand well enough and feel comfortable with. This can be done by increasing the abstraction level and restricting feature sets (e.g. ESlint), using Frameworks (React, Bootstrap, ...) and transpilers (TypeScript, Babel, Sass). Note that you&#x27;re loosing freedom here and you&#x27;re buing into other peoples understanding how a sane place of web programming should look like. In the Web there are a lot of ways to do things, there&#x27;s no monoculture! And if you don&#x27;t like the existing ways, roll out your own (though I wish people would be more careful &#x2F; sceptical with this attitude).<p>And there&#x27;s the backend. You&#x27;ve got all choices of programming languages and frameworks there. If you&#x27;re making a mess of you&#x27;re backend, you really can&#x27;t blame the web for it.<p>For someone without much web experience, this process of choosing frameworks, workflows, toolsets just to get to one (of many!) sane programming experience is surely daunting. You have to choose and configure your envirionment yourself first, just to get started. You really need someone experienced to set this up and understand most of its implications. If you&#x27;re having so bad experiences with your current web project, maybe some bad decisions were made regarding this. Or too much freedom (and therefore chaos) was left in place and got out of hand.<p>If you don&#x27;t have the experience to make those decisions, you could just start with one approach that is pupular right now. I guess on hacker news this would be something like React, Babel, etc.. There are a lot of tutorials out there to put this all together.
评论 #12477545 未加载
palerdot超过 8 年前
One thing that frustrates me as a front-end dev is the inability to settle down in an ecosystem. Every minute, new tool&#x2F;framework is coming with a tagline &quot;There is no need to do that like you did with X, Y takes care of it for you&quot;.<p>Now the Y might be webpack&#x2F;React, tomorrow it might me something else. Whoever says React gives them a consistent way of doing things, they would have said the same thing to Backbone&#x2F;Angular&#x2F;ember&#x2F;bower&#x2F;grunt&#x2F;less&#x2F;sass&#x2F;precss&#x2F;postcss&#x2F; .............<p>Ultimately, it is about controlling your mindset and navigating through this onslaught of tools&#x2F;frameworks in the front end ecosystem.
评论 #12480754 未加载
评论 #12478989 未加载
icedchai超过 8 年前
I&#x27;ve been doing web development since 1995, starting with CGI &quot;apps&quot; in C and Perl. Yes, it is a pile of hacks. The fundamental issue is we&#x27;re building &quot;apps&quot; on an environment intended for document delivery.
ubernostrum超过 8 年前
Is it really that there&#x27;s some exceptionally high amount of hackery? Or is it just <i>different</i> hackery than the kind you&#x27;re used to and have so thoroughly internalized that you no longer see it as a pile of hacks?
jamez1超过 8 年前
I like to think of web programming like the english language, how it&#x27;s a mashup of all these other languages and ideas. It&#x27;s hard to learn as an outsider and has many gotcha&#x27;s and wrote learning exercises
cdevs超过 8 年前
Currently at work someone wants to learn to create web pages and prototype his ideas. He asked me if he&#x27;s ready because he&#x27;s learning JavaScript and I had to reply you still need to learn html, Css, sql and a server language to do what we do how we do it. It&#x27;s a shame so he moved on to some new site &#x2F; page from mit that&#x27;s allows drag and drop boots troop elements and drag and drop database logic like &quot;users must be logged in&quot;. It&#x27;s unfortunate there&#x27;s not much of a middle grown between learning 5 things and drag and drop.
agentultra超过 8 年前
Web programming is not that bad and I think you are missing something.<p>You&#x27;re entering a time where ES6 is mostly implemented and should be feature-complete in most platforms soon. I cannot explain how big of an improvement this language is. Javascript used to be a language that other people worked in and I refused to understand. I wrote some thing in it and dabbled when necessary but I was always amazed at how primitive it was for such a high-level language. It was usable though with a bunch of libraries to support you. ES6 makes most of that legacy obsolete.<p>However ES6 is a bit of a kitchen-sink language now. There are multiple means to iterate over a collection, there are classes, monads and functors... did I just say <i>monads</i>? I meant Promises. And did I say <i>functors</i>? I meant sequence types with a useful prototype. The point is that if you choose the right subset for you it&#x27;s a decent language now.<p>HTML5 kills the notion that, &quot;the web is only for documents!&quot; The acronym has aged a bit and is not really descriptive of what HTML5 is anymore. Most GUI libraries and systems I&#x27;ve seen implement the interface in terms of a tree of &quot;objects&quot; with the root node being the Window itself. That is essentially what the DOM is now with the browser providing the run-time loop, input, etc. We have a rather rich array of elements to work with... buttons, input boxes, a rich layout model, 2D canvases, WebGL contexts...<p>Where it does still suck and where I think you might be getting frustrated is in the tooling. There isn&#x27;t much of a standard library in Javascript save for the objects you&#x27;re given. They all loosely fit together with little cohesion. It is quite frustrating to get a program started and take it all the way to something on the level of Gmail, Facebook, or Twitter. It&#x27;s even more frustrating if your expectation is an environment such as Qt where you have standard tools, libraries, and all of that.<p>However with some effort and determination you can tame the beast. The part of the kitchen I find most effective is the functional programming side. I use Fantasyland compatible libraries and wrap other libraries with them. I&#x27;ve devised my own configuration of build tools based on Webpack, npm, that I can spin up with Yeoman. It&#x27;s not great but it&#x27;s tolerable.<p>... but now I&#x27;m looking into Bucklescript since I&#x27;m a closet OCaml fan... and that seems to be another popular angle for building &quot;large&quot; applications in Javascript: compile down from a more familiar language with the tooling you need.<p>Nothing is straight-forward. Not immediate-mode custom UIs; not big, fancy frameworks like Qt; and certainly not the web... but the web as a platform is awfully powerful, flexible, and open.
segmondy超过 8 年前
Nah, you are not missing anything. You are not alone, but you are also resisting change because you are not use to this fast pace of change. The reality is that you need really great memory and ability to organize and discover information fast to make sense of todays applications. It&#x27;s layers upon layers of abstraction. It&#x27;s terrible in a way when you have to work with others you have to deal with it. When you work by yourself, just keep it simple, choose a few well proven and solid stacks and just stick with them.
avisples超过 8 年前
Application development on a web platform meant for documents is inherently a hack, but the evolution of the ecosystem is reaching a point where many of the hacks are quite good. There&#x27;s just a lot of inertia from existing codebases and developers used to the previous ways of doing things, and FUD from places like Google with Angular and Polymer.<p>Web development seems to be particularly suited to the model of building a hack, then pouring concrete over it, then building the next layer of hacks on top.
transfire超过 8 年前
I was thinking about this the other day, and one possible way to improve the situation is place a hard separation between web documents from web applications. Currently we try to shove both capabilities into a single paradigm (stack). But the two don&#x27;t mix well.<p>What might that look like? Ultimately a much more elegant HTML and simplified CSS for web documents, and quite likely no HTML for web apps -- the Javascript and CSS would merge into a GUI-oriented language.
pjmlp超过 8 年前
Yes.<p>It should have stayed as hypertext documents, just plain HTML + CSS, with everything else just covered by network protocols.<p>Instead it is a pile of hacks of trying to bend HTML + CSS + JavaScript to behave like native applications, but not quite, because the browser is in control of the L&amp;F leading to yet another pile of hacks to make the already existing hacks to behave the same across all required browsers (including different versions of the same browser).
palerdot超过 8 年前
One important thing is a final web page is a confluence of code coming from different sources, and not controlled by the end user or the developer&#x2F;website. If you define some functionality, I could just override (intentionally or not) with my code which also gets loaded along with yours.<p>Combine this with the inconsistent browser playground, you might get some perspective of the hacky nature of the workings in the front end world.
peter_retief超过 8 年前
I agree, its way more complex than it should be, probably something to do with the browser wars and propriety software battling to add barriers of access
Kaizyn超过 8 年前
Have a look at Elm. That looks like a fairly promising alternative to some of this mess. I don&#x27;t think you can get away from CSS and HTML5 though.
mmilano超过 8 年前
Are you sure the assessment web programming being a series of hacks on hacks isn&#x27;t an artifact of inheriting a fairly long-lived and large code base?<p>I don&#x27;t think I&#x27;ve touched a large codebase that has been around for a long time which didn&#x27;t feel hackish.<p>I&#x27;d make the evaluation of web programming based on a language and framework that feels most proper to you, and based on the use of it with a brand new app.
samblr超过 8 年前
My view is exactly contrary coming from system development experience. I cannot think why would anybody handcraft MVCish frameworks in js, jquery etc. I have programmed MVCish UI frameworks and middleware in c for AV products 10 years ago. And as a UI dev u want a working MVC. Now I&#x27;m using angular and totally feel at home. I think sans these new frameworks web must have been really dark place.
stevesun21超过 8 年前
As working on backend and front end for many projects for different size of projects over years, I would say &#x27;yes&#x27; as my short answer.
prawn超过 8 年前
It might be hack on top of hack, but I find it quite enjoyable when I&#x27;m completely in control of what I&#x27;m delivering. When I know what&#x27;s reliable and what&#x27;s dangerous, I can work around those limitations. Where things get particularly painful are when you are at the mercy of decisions made by a client or boss who won&#x27;t listen to reason. Then it&#x27;s hell.
shurcooL超过 8 年前
I agree, and I decided I won&#x27;t accept the hacks and compromises anymore, and started building everything in Go (even frontend stuff) in my free time. There&#x27;s much to do, but at least the foundation (type system, type safety, etc.) is very solid.<p>This way, I don&#x27;t have to build on top of the hacky and messy things anymore, but slowly take my time and do things very right.
eksemplar超过 8 年前
There isn&#x27;t much of a difference between web and application development in my eyes. Both should be build on a service backend, with a common architecture making different systems work together through APIs or MOX-agents.<p>In that world the &quot;view&quot; part of your system might as well be web based. Making front end look and feel good, is terrible in everything anyway.
saosebastiao超过 8 年前
Not gonna comment on most of this, as I&#x27;m right there with you. Web development is a gigantic shit sandwich. But I have to at least respond to this:<p>&gt; <i>I&#x27;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, </i><p>No, you do not. UIs are state machines (not <i>like</i> state machines, they actually <i>are</i> state machines). It is <i>impossible</i> to have a stateless interactive UI. If it is stateless, it might be a web page or document, but it is not a UI.<p>Any attempt to make a &quot;stateless&quot; UI will fail because of this impossibility. What many half-baked frameworks will attempt to do is make them as stateless as possible, which is a recipe for disaster, as they can&#x27;t actually get rid of the state, they can only move it to some location where it wasn&#x27;t designed to store state (Routes? Cookies?), or to some location where the semantics and comprehensibility have been compromised. In fact, this statelessness is precisely one of the major problems with web programming...you&#x27;re trying to bolt something inherently stateful onto a format that was designed for statelessness (HTML was created for documents, not apps).<p>Programmers in general, and UI programmers in particular, need to get over their fetish for statelessness. Sure, modeling a stateless problem with stateful code is ridiculous, but if you try to model a stateful problem with stateless code you are going to have a much worse time. Modeling state is hard...don&#x27;t make it harder by pretending it doesn&#x27;t exist.
paulftw超过 8 年前
Frontend always was and always will be harder than backend, regardless of the platform&#x2F;framework etc. Yes, the fact that HTML &#x2F; CSS is a technology designed in a different era (slow keyboard+mouse desktops) for a different purpose (displaying static hyperlinked documents) doesn&#x27;t make life any easier.
patatino超过 8 年前
Everything is a mess, so keep it as simple as possible. Yeah it&#x27;s nice to have an awesome frontend with javascript but it&#x27;s much simpler and cleaner to post something back to the server.<p>I fell in love with web programing 14 years ago because I don&#x27;t have to save the state of the UI and activate or deactive buttons.
hellofunk超过 8 年前
true, unless you look at incredible new ways of UI design like React and its Clojurescript counterpart, Om and others. FRP and similar concepts has so dramatically changed how I think about software design that I now use it for most of my native C++ projects as well, or at least, I get as close to it as I can.
35bge57dtjku超过 8 年前
&gt; Is web programming really that bad? Is it really just that I need a new mental paradigm?<p>In the sense that there&#x27;s 1000 web frameworks that all put their own shitty spin on everything, yes definitely. OTOH it shouldn&#x27;t be hard for you to improve on those things and release web framework #1001.
chunkyslink超过 8 年前
This is a good resource in terms of &#x27;getting your head into the space&#x27;.<p><a href="https:&#x2F;&#x2F;12factor.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;12factor.net&#x2F;</a><p>Not aimed at beginners but it made me think a lot more about how complex this can actually be then a set of related technologies.
dreta超过 8 年前
HTML and JS are bad, but you can reduce them to a basic syntax that you can work with. CSS on the other hand requires hacks to perform the most basic operations like positioning an element relative to another element or centering an element inside of a container.
kharms超过 8 年前
As a non-web-dev, the hardest problem I&#x27;ve encountered is choice.<p>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?<p>There are dozens of options for most things, but no guide to them.
plg超过 8 年前
Isn&#x27;t everything? The older I get the more I realize that all of the orderly systems I thought governed life, society and the universe are in fact a system of hacks and bag of tricks. Sure there are rules. Except when there are exceptions. And on it goes.
p333347超过 8 年前
From my experience, it is, especially in front end development when you must have cross-browser support. For me the term <i>cross-browser support</i> itself is quite amusing and nonsensical given that there is supposed to be a standard.
bikamonki超过 8 年前
So what exactly are the front-end stack haters proposing as an alternative to hack-on-hack? Should we just dev&#x2F;maintain N code bases of native apps to run on every OS and then somehow <i>connect</i> them?<p>Haters are missing the big picture...
sidthekid超过 8 年前
I wonder if 50 years down the line, maybe when humanity is building spaceships to go to other planets, will the interstellar software be written in C++&#x2F;Java or Assembly or be produced entirely by AI subsystems or what.
评论 #12482818 未加载
godzillabrennus超过 8 年前
Yeah it is. Django is a good example of a framework that is popular and well documented overall. Yet when a new Django revision comes out the books and documentation from third parties take months to follow on. So by the time I&#x27;ve learned all the major changes in a revision well enough it&#x27;s already party over for that revision. Official support is just ending because they have a new revision out. Unless it&#x27;s an LTS build but that means there is a whole lot of new stuff in these non-LTS releases.<p>I for one would prefer to have Django and other projects abandon the minor revision numbers like 1.8 and 1.9 in favor of what Asterisk did and call them what they are. Version 8 and Version 9.<p>That&#x27;d make it feel less hacky and if done right they could encourage longer support cycles for these major version releases.
评论 #12482481 未加载
GoToRO超过 8 年前
It&#x27;s the same like any other open source project: it gives you 100 ways to hang yourself and maybe only one way to do it right. Your job is then how to find that one way.<p>Frameworks? use them when you need to deliver crap, fast! :)
realworldview超过 8 年前
You are not crazy. Many, many people have come before you and asked the same. The reply is always the same. Yet the craziness continues, it multiplies and it leaves nothing in its wake. Nothing stirred in the embers.<p>And the DOM was.
wepple超过 8 年前
my biggest realisation of this was when reading the opening chapters to Michel Zalewski&#x27;s Tangled web [1]. He does an excellent brief intro to how we got to where we are, warts and all.<p>Things like content sniffing where a browser can&#x27;t work out what type of file it&#x27;s been given, so has an algorithm to take a guess and render based on that are what we&#x27;ve got to deal with.<p>[1] <a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Tangled-Web-Securing-Modern-Applications&#x2F;dp&#x2F;1593273886" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Tangled-Web-Securing-Modern-Applicati...</a>
bikamonki超过 8 年前
If you&#x27;ve been codign &quot;since before the web&quot;, then you should be able to see the whole picture. The browser is the new VM. Horrible hacks are necessary to test ideas and move forward new paradigms.
mathgenius超过 8 年前
About 15 years ago I made the conscious decision to ignore web programming entirely, in the hopes that in a few years things would settle down and get some sanity. Apparently this has not happened.
jaunkst超过 8 年前
Its very, opinionated. It has to be! (for now)<p>I can agree with almost every opinion in the comments, almost everyone is right. But with a strong opinion and a strong mental model there is light at the end of the tunnel.<p>The future is bright for web applications, and almost everyone in the space is aware of the biggest issues, which is important as the browsers adapt new features to help ease the pain.<p>Web development is a scary place but it can be enjoyable when the right pieces are in place. Older web applications have crazy hacks and made up anti-patterns to solve problems, which mix context between the client and the server making it a nightmare to wrap your head around or even implement new features.<p>Often a new feature in such application guides the developer to accept the fate of adding more technical debt, and creates a strong desire for a better way with no way out without a major overhaul of the backend and frontend. I have spent countless hours building patches to older systems just to prepare them for the option of pivoting to more modern approaches.<p>Today web application development is a fast moving target. Design patterns are changing from framework to framework. Even from framework version to version. i.e Angular 2.<p>It&#x27;s almost as if the current state of frontend development is very comb shaped. broad in approaches, and that the community is digging deep into patterns that are showing success in scaling, and performance. We have to deal with various topics, the lack of concurrency, performance of the DOM, managing scope, and state.<p>I have a few opinionated methodologies to help me in modern web development.<p>1. Pick a strong frontend and backend frameworks and know them well.<p>2. Don&#x27;t mix the backend and the frontend code. Keep the backend API in context to the business domain, data validation, and security. Allow the client to be an independent consumer of the API for portability and scalable distribution.<p>3. Keep your JSON responses as flat as possible, and avoid deeply nested data structures. Rely on functional programming to map and reduce your data on the client into deeply nested structures if needed.<p>4. Decide what the client can compute for free computation cycles.<p>5. Stay as data-driven as possible. Fall back to the server or micro-service if the client is not efficient at a demanding task.<p>6. Choose libraries with the least restraints and high flexiblity. They should not obfuscate or complicate your ability to implement the design. I find most libraries can assume to much control.<p>We are in a better place today then we have ever been for web applications. Though the learning curve is intense and the subjects broad. Especially for fullstack developers. I feel that finding what works and an opinion of how it should be done is important.<p>I am less picky about the backend technolgies as I am with the frontend. I would really only consider Angular, or React for my frontend. Both Angular and React expect you to form a mental model of how they work, and what a build pipeline should look like which is very project specific in my experience.<p>Its the wild west our here, and expect things to continue to change. Building an opinion, vetting new libraries to add to your toolbox, and experimenting is just part of the web application world.
the_common_man超过 8 年前
I think any programming model that&#x27;s been around for a long time is complex. Backward compat is the devil. Take OpenGL for example. All the compat stuff has made it practically impenetrable.
BasDirks超过 8 年前
HTML, CSS and JavaScript are improving. Your experience as a web programmer depends on the browsers you are working with. If your clients include IE6 users, your life is going to be worse.
solidsnack9000超过 8 年前
It is the amazing architecture that integrates those hacks, though.
bigopon超过 8 年前
Because it has to do something nothing could everdone before ? Unites the worl, provides collaborative environment. So it needs time to evolve. You will hate it less overtime
justifier超过 8 年前
where does the hacking end?<p>i see using an electron passing over an elemental substrate as a hack of electromagnetism to allow its properties to represent arithmetic logic<p>i see little endian as a hack of binary notation of sets to be able to compose information<p>everything you do is a hack on top of a hack.. on the shoulders of giant stacked turtles.. or some such<p>what about web development sucks for you? in recognising them do you have any ideas for how to relieve your pain points?<p>web development is the same as application work.. solving problems
tracker1超过 8 年前
I know there&#x27;s a bit of boilerplate to learn, but if you stick to React + Redux + Fetch using Babel and Webpack, you&#x27;ll have a much easier time of it overall.
kelulon超过 8 年前
Yes, it is. That is exactly what I have found. It&#x27;s just insanity. I can honestly say Javascript made me cry today. It&#x27;s not just you. There is a better way.
tempodox超过 8 年前
Yes, very much so. And everybody is too busy making money to go back to before all those wrong decisions and apply the knowledge we now got from hindsight.
patsplat超过 8 年前
You are resisting change. User experience code is different from backend code. It is often a pile of incomplete abstractions and device specific hacks.
mruniverse超过 8 年前
It is but don&#x27;t worry about it. It&#x27;s getting better by the hour.<p>Just think about this: Has it ever been easier to reach so many people with so little effort?
z3t4超过 8 年前
The trick to web-dev is to avoid a &quot;back-end&quot; at all costs. Just make all your &quot;data&quot; available in human friendly HTML.
gvilarino超过 8 年前
Programming is just a series of hacks on hacks.
robbyt超过 8 年前
Yes, it sucks. So how do we fix it? (In perfect world, how would you reinvent the web as an application platform...)
carapace超过 8 年前
Elm <a href="http:&#x2F;&#x2F;elm-lang.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;elm-lang.org&#x2F;</a>
sboselli超过 8 年前
You sound like a good candidate for something like Elm (elm-lang.org), with its Elm Architechture.
zebraflask超过 8 年前
That&#x27;s a colorful way to put it, but yes! Of course it is. That&#x27;s what makes it fun.
ktRolster超过 8 年前
Web programming is ok. A lot of the complexity comes because it is actually two different problems:<p>1) The problem of displaying a (mostly static) page of HTML<p>2) The problem creating an application<p>There are web frameworks in existence that solve either of these problems, but things get ugly when people don&#x27;t think about which problem they are trying to solve.
评论 #12477628 未加载
exabrial超过 8 年前
Yes. And while HTML5 brought a lot of awesome features, it also created another set of problems, the least of which, is the syntax is impossible. There are 100 &quot;right&quot; ways to do things now, when in fact, a language should specify an exact way of doing something.
gruzilla超过 8 年前
I have a a very similar background as the OP.<p>Also seen&#x2F;worked on projects that are a mess and devs there built hacks upon hacks to keep everything up.<p>I also felt like I am stupid (besides studying software engineering and working in the web business for 15 years) or I miss something. But then I also had the privilege to work with very skilled people and get a different perspective.<p>Here comes my argument:<p>I argue that most projects that went to be a mess have been set up by people that had to work with incomplete information or insufficient time to conquer the stated problem. So I project the question &quot;is-technology-the-problem?&quot; to &quot;is-the-team-the-problem?&quot;.<p>In my experience much bad influence - that create messy projects - comes from the lack or the way of communication between technical designers (who say whats possible), developers (who say how its possible) and other stakeholders (who normally &quot;just want something&quot;). I think of a situation here, where I had to work with a sales guy who proudly sold &quot;rapid development&quot; and &quot;agile iterations&quot; without understanding the technical or management perspective of true rapid development.<p>When it comes to making design decisions (which WILL influence the &quot;messiness&quot;) the web is full of different approaches, technologies and so called &quot;best practices&quot;. If you&#x27;re a designer of a &quot;will-become-big&quot;-project it is difficult to make those decisions based on this variety of solutions (which as the OP stated almost everytime suck after some months). The fact that every framework presents itself as the best and most versatile does not help at all.<p>My best practice to go out and talk to people about my problem and not ask the internet. Its others people experience you only can access in a discussion, because normally you don&#x27;t and cannot know what information you lack and therefore ask superficial questions on the web and thus get superficial solutions and have to conquer previously unexpected problems in long-term.<p>Another argument I want to make:<p>If you were a carpenter and would have to build the interior of an opera you would not go to the web, google for a month and then think you have exhausted all available resources and now you are ready to build that opera interior. The ubiquity of &quot;quick solutions&quot; make developers believe there are no long-term-effects of such decisions and thus most such small decisions never get discussed. If you have worked in teams in other branches (building digital arts, building a house boat, stuff like that, where you MUST have a team) you get the point of what I am saying. Its only computer science where people stop talking because they think everything is clear to everybody.<p>About your question about orientation:<p>I suggest getting aware of the high level concepts of full stack web development and truly understand the concerns every layer tries to attack. Web-Development - like every other software engineering discipline - is all about Devide&amp;Conquer. N-Tier development (one approach to D&amp;C) is nothing new, but the semantics of web development are new. A good designer has to speak those new semantics fluently. It also helps getting a good feeling about what actually is a &quot;best practice&quot; and what is just sold as such. There simply is no universality to web programming as there is none to other software engineering disciplines.<p>I gained a lot of confidence in knowing about the classification of problems and how you would generally combine them instead of building a big hashmap of problem -&gt; web-tech-framework (This also reminded me of some complexity courses I took in my studies). Giving clear semantics to different parts of your application and discussing those layers using natural language also reduces your teams vulnerability to total chaos and prepares for unexpected changes of requirements.<p>Further I learned from experience that its often the time-constraint that promotes messy code that never gets cleaned up because the project somewhat dies a slow death, which in my eyes is just a reminder that web-tech is something new to the society as a whole.<p>Finally:<p>Thus I developed the following perspective: I see myself as a moderator of language and problem-awareness. I often argue in front of customers that if you describe the project as a map of the problem domain there are A LOT of blank areas and its our teams effort that will unveil&#x2F;debunk&#x2F;uncover those blank areas. I also point out that there are a lot of semi-blank-areas on our project map. I for example know how agile development looks like that does NOT generate a hack-upon-hack architecture but the others don&#x27;t. On the other hand I have no knowledge whatsoever about interiors of operas (to reuse the example from above). Its that explicit merge of information that prevents a projects structure going astray.
joelbondurant超过 8 年前
HTML5 seems significantly less advanced than Java AWT was in 1997.
评论 #12477499 未加载
naranha超过 8 年前
Are you talking about the client or server side?
jimjimjim超过 8 年前
house of cards.<p>with each card being the flavor of the month provided by an external source.<p>it&#x27;s almost enough to make me want to go back to activex.
gotofritz超过 8 年前
Yes, it&#x27;s you resisting change.
keithnz超过 8 年前
The web world is just a new world of different problems. One of the most interesting things about this world is there are a LOT of participants. A big part of the web world is diversity, it&#x27;s kind of like moving from the country to a big multi cultural city. Many many many ideas are being thrown around. Finding cohesion between ideas is tricky. Being a learner in this world is bewildering.<p>Understanding the browser is very important, perhaps start with <a href="http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;internals&#x2F;howbrowserswork&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.html5rocks.com&#x2F;en&#x2F;tutorials&#x2F;internals&#x2F;howbrowsers...</a><p>If you are a good coder, javascript can be awesome. Put a lot of time into understanding the language. Don&#x27;t stray into variants like typescript or coffeescript or elm or anything else till you are pretty happy with js. Prioritize learning ES6 over any variants. The bulk of information on the net and libraries, etc is standard js.<p>Get a good understanding of webserver, HTTP &#x2F; Web sockets. Sniff packets and also understand HTTPS.<p>Invest a lot of time into HTML and CSS, there&#x27;s a lot of advice on how to build your own CSS frameworks from the ground up, this is really worthwhile. But also spend a bunch of time with something established like bootstrap ( or any other UI framework ) so you can see what problems frameworks are trying to solve.<p>Language? Frameworks? This is where it gets tricky. I suggest understanding a Node stack, as it&#x27;s popular, and a lot of examples use it as a backend. It may not be what you actually end up using. Checkout Angular2, React &#x2F; redux as they are popular javascript frameworks that run in the browser to deliver application like UI. However, go for statically generated pages if you don&#x27;t need that kind of UI, classic GET&#x2F;POST delivered webpages still deliver a lot of value.<p>Security &#x2F; Authentication - Can be very tricky and in some environments it&#x27;s left to roll your own<p>Data - Can be super convoluted, often taught in a web context without much concern for security and authentication (depending on stack). In general avoid having too many layers between your data store and the UI. SQL &#x2F; NoSQL &#x2F; BigData Stores are all toys to play with (but each data store tech has its own problems and tradeoffs) and more often are getting mixed together.<p>Now, because you can pick and choose nearly any aspect of the above, it can become very hackish, especially as new toys are coming along all the time.<p>If I was going to recommend a single thing to start playing around with? probably meteor. It packages up a lot of modern web things for you, it&#x27;s all javascript, it uses a mongo back end (which is a json store, not necessarily the greatest choice of DB though), has a easy package system, and supports a number of popular front ends. None of which is how you should choose a production stack, but it can be a good way to get started.
评论 #12482225 未加载
emodendroket超过 8 年前
It can be OK, but yes.
jtrtoo超过 8 年前
Yes.
justaaron超过 8 年前
yes
the-agreeer超过 8 年前
All these dozens of disparate ad-hoc web technologies and defacto standards are built like a tower of babel on quicksand. No one truly understands all of it. Without View Source and a healthy dose of copying&#x2F;stealing no one could get any of it to function. Yet in spite of all of this - this web thing somehow works. The only takeaway is to not bother trying to grok all of it. It would only lead to madness and missed deadlines. Just try to avoid frameworks that emphasize purity of design over pragmatism and instead use a workflow that gets you to the finish line.
评论 #12477668 未加载
andrewmcwatters超过 8 年前
The cleanest and most efficient methodologies for web development today are largely unpopular.<p>The people who know how to write efficient websites, web pages, and web software in general are going to be either the people who have been doing it long enough to remember the old ways, or those who wade through enough of today&#x27;s bullshit to understand how to do things with less code, and faster rendering times.
评论 #12480793 未加载
cureyourhead超过 8 年前
We are all Windows programmers now.<p>The web is really just one enormous operating system we&#x27;re all just hacking on.<p>But it&#x27;s only slightly better then this but not as clean as Linux. W3C sort of plays the role of Torvalds
hmans超过 8 年前
It&#x27;s been ruined by a generation of developers who believe it a good idea to build stateful applications on top of an inherently stateless document-centric infrastructure.
评论 #12478706 未加载
评论 #12477934 未加载
评论 #12479732 未加载
ionised超过 8 年前
As primarily a back-end developer I am being exposed to some front-end work at the moment with AngularJS&#x2F;CoffeeScript.<p>I have to agree with you. I&#x27;m not enjoying it at all.
评论 #12495262 未加载
gjolund超过 8 年前
In theory, no.<p>In practice, yes.
craigmcnamara超过 8 年前
Nailed it!
forrestthewoods超过 8 年前
Yes.<p>Whoa. Betteridge&#x27;s law doesn&#x27;t apply here. Weird!