I’m too lazy to be a HTML developer
polygeek.com
polygeek.com
(defmacro unless (cond &body res)
`(if (not ,cond) ,@rest))
rather opaque; but it's actually pretty darn simple. You might find body {
width: 800px;
position: relative;
left: 50%;
margin-left: -400px;
}
impossible to pull out of one's ass; it's not, you're just unused to negative margins. To you, TeX macros or M4 or continuations or macros or dynamic typing or static typing or dependant typing or manual memory management or garbage collection or all sorts of things might look complex. But surprisingly, there's a whole industry of people who don't.You're not too lazy to be an HTML developer. You're too lazy to become an HTML developer. But that, after all, is just you being lazy.
body {
width: 800px;
margin: auto;
}
(This also has the benefit that the left hand side of the body does not disappear off the side of the screen in small browser windows.)There's a similar problem with the css in the article he links to - it is more complicated than it needs to be, which just confuses the subject. Anything is hard to learn if it is taught badly.
Personally I like negative margin better than text-align: center since the style is only applied to the box being centered rather than the parent box and the box itself, but surely this is a matter of preference or the design of the particular page in question.
Here's an example of text-align: center and margin: auto side-by-side: http://jsfiddle.net/wH5Pd/
Try making the window narrower so that the html pane in the bottom right gets horizontal scroll bars. (In the real world, there might be a two column layout, such that the textual content fits in the narrow window, but the full width of the content doesn't.)
Even when the window is narrow, all of the content in the top div can be accessed by scrolling horizontally. In bottom div, the left hand side of the content gets clipped because it is positioned to the left of the window, and scroll bars don't extend into negative offsets. If you're positioning an adornment which doesn't actually need to be visible, the negative margin trick might be OK. But for normal body content, margin: auto is the way to go.
> Take a look at the CSS in step 2 of the Lightbox example. Are you kidding me? There’s no way in hell any of that follows logically.
And the other shoe dropped. I took a look at the example step referenced, and it was all very straightforward to me. I realize that this was because I'm already familiar with CSS, but I can't imagine it would take a motivated learner more than a couple minutes to learn what was going on in the code listed.
Programming in general is about always learning new things. The industry is always evolving and if you get complacent, you'll get left behind. This shouldn't be news to anyone, but if your reaction to hearing it for the first time is "that's too hard, I don't want to do that", then maybe you should go work on your carpentry skills.
A very different claim.
You might understand the code but you might not understand how it was reached from the requirements. There's a bit too much obscure and mystical stuff.
Well designed systems require you to know the basics and you can behave logically from there on so that you can deduce by yourself how things can be made to work.
Relative positioning and divs or styles inside other divs/styles, text linebreaks and all that has no real dependable logic in CSS, at least didn't a few years ago when I last tried doing it by hand. It required a huge amount of trial and error.
http://www.timjpriebe.com/wp-content/uploads/2009/12/css-mug...
In desktop development, you learn the underlying foundations first (the programming language, files, networking, graphics, GUIs, etc), then weave them together to build your application. It's slow, but worth it -- often the concepts are universal. How many times do you have to re-learn file IO?
In web development, it's really easy to build the finished application quickly but not understand any of the foundations. Look at how many "rapid development" frameworks there are out there; most of then are fast to install, and the result is usually awesome. And plugins! There are plugins for everything, and they work so well! But the foundations are intimidating -- especially because there are so many layers of abstraction piled on top of each other. Where would you start? The browser DOM? How JavaScript is interpreted? How your database implements transactions? The more web development I do, the more I realize how freakin' tall the stack is...and how little I really know about it. Kind of scary.
What are you defining as file IO? What do you mean by re-learn--do you mean forgetting and having to learn again, or learning some new fact that changes your total understanding of the thing? What has gotten me in the past is learning how some particular language does file IO[1], which might mean learning something new about file IO I didn't know before (but didn't matter for what I wanted to do at the time) that expanded my perception. Though I guess the concepts of "read", "write", "rewrite", and "append" are the same.
I really don't think you get any more universality in desktops than you do in the web world. You might get more in the web world if you restrict your universe to the web world, due to a limited selection of choices on the front-end. (And backend too if you go the traditional route of learning LAMP with PHP on a shared host provider.)
Related to the other comment on RAD systems, even NeXTSTEP in '89-'95 had the WYSIWYG concept applied to everything as one of its major selling points. http://www.youtube.com/watch?v=j02b8Fuz73A Around 23:00 Jobs starts to demo making a GUI application that talks to a backend DB and shows pictures, and you don't need to know SQL or joins or anything.
So I don't think the desktop world has been any better in regard to keeping abstractions at bay or offering universal modes of thought (hey fork()!). The first time I programmed something with tkinter I kept asking "Where's my user-defined main loop? Where's my event handler? Where's my render stage? WTF is this 'pack' method?" Because my prior UI experience on a desktop was with pygame, which defaults to having you control every pixel.
[1]Bash likes its pipes and IO redirection, C likes its file pointers, C++ likes its streams, Java likes those too but also likes Buffer Objects et al., PHP has a nice function to glob a whole file in as a string (but you can shoot yourself in the foot if you run out of memory), "Python is obvious", "Perl is magic". If I try and load "./file" what's the context of "." and how does my language let me get a known value for that that's relative to my program and that's platform independent? What about encrypted folders, different file systems, file encoding? Will the language/OS abstract that for me? Now I want to start doing things asynchronously. Now I want to start talking to web files, now I want to start sending cookies and stuff when I'm talking to web endpoints instead of files, maybe I want to do socket IO now, and this whole trip has taken me through several other realms which seem to me pretty far removed from simple file IO.
"Build us a banking system that can be used by our employees to safeguard our customers' deposits and analyze our loaning ability, while providing web-based access to accounts by customers."
"OK. First, we'll need several tons of sand, some raw copper ..."
I think it speaks volumes that the infrastructure design of the web (or perhaps the Internet) prevents todays web app developers from worrying about how their bits move from the server CPU to the users' screens.
P.S. I'm terribly disappointed in my fellow posters actually answering the rhetorical question.
Edit: ordering is important to clarity
The result is that when I forget something, I can't go back and figure it out from something simpler. It also makes it really hard to build abstractions that actually work.
Dunno. Bytes IO or text IO? evented IO? Lazy IO? Monadic IO? Which platform are you on? Will there be concurrent access? Is your file always a file or is it also a socket?
Yeah, you re-learn file IO quite a bit I'd say. And that's without talking about APIs going from straightforward (and broken) to completely baroque (and still broken).
Oh sure, sometimes
> it's really to [read a file] quickly and but not understand any of the foundations.
isn't it?
I have not really had to re-learn file IO since then.
Clearly there are new things to be learned... (do usb sticks even have sectors?)... but having that low-level experience tends to be more than enough for a front-end web developer.
As for HTML and CSS, I agree that they're difficult to debug and that it takes a lot of experimentation to become comfortable with. Developer tools like Firebug and those included with Chrome can take a bit of the mystery out of HTML and CSS.
Since breakpoints don't exactly make sense to apply to markup and style sheet languages, I'll assume the author was complaining about the lack of breakpoints in JavaScript. In fact, you can use breakpoints in Firebug.
When the author talks about the apparent complexity of various languages and platforms, he should know that this is entirely subjective. I've been goofing around with HTML/CSS/JS since I was very young, so by this point most lightbox tutorials and similar articles look fairly simple to me. Step 2 in the tutorial he mentions looks quite simple to me. The only things that I suspect would be confusing to a newcomer would be the weird vendor prefixes.
I really wish xhtml would have won in place of HTML/CSS. This kind of things would have been far more easy
> I really wish xhtml would have won in place of HTML/CSS.
This makes me doubt that you understand what you are talking about. XHTML and HTML have exactly the same semantics. CSS has little to do with them (you can use CSS to style you XML documents if you wish so). With CSS3 and modern browsers you can pretty much avoid anything to HTML just for styling purposes. Heck, take a look at http://camendesign.com/ It's not visually complicated, but there are no IDs and CLASSes in the source.What I said is - look at ANY of top100 Alexa websites and show me ONE where style, semantics and action is not mangled together in one big chaos, where HTML is just semantics and not DIVs put inside each other in a hierarchy that doesn't follow semantic logic, but visual logic (with divs classes "UP", "upper_menu" etc), where javascript sits neatly in its file instead being all over the place.
I don't remember the outcome of the debate, because we then proceeded to talk about TV shows.
I still write my HTML5 in correct XHTML Syntax.
Sure, you save some (or a great deal many) characters, but at the cost of making everything that needs to work with it more complex. (Browsers are a large slice of this pie, but by no means is the only slice.)
I'm going to sit back and wait for the cycle to come back around to XHTML-like correctness again.
Those who cannot remember the past are condemned to repeat it.
See http://www.whatwg.org/specs/web-apps/current-work/multipage/... (via http://mathiasbynens.be/notes/minimal-html via http://news.ycombinator.com/item?id=3356389 )
I'm back to doing firmware and control software now. Much happier. It's all about what you know and how it fits your style of working.
HTML is a hint as to the presentation, and every client that reads the hints will largely present it the same way. But some may not... older clients, newer clients, clients for accessibility (Jaws Reader).
Accept it, be at peace with your lack of absolute control and put only the markup you need to hint at the layout you need, and then use only the CSS you need to hint at the positions of things relative to each other, and sizes relative to each other.
Once you realise you don't know anything about the screens, resolution, connection speed... or even if there is a screen, it's a lot easier to use HTML quite elegantly.
A web browser + Firebug/Web Inspector is effectively a giant REPL, what more could you want?
It has been so pleasurable to not have to worry about HTML / JS - if I want a dialog box, I can have one very simply with no messing about.
CSS is making it interesting & I can understand you find javascript not easy, but HTML, really?
No offence, my little sister also doesn't understand HTML, but then again, I don't see a blog post written by my little sister on HN.
The way html, css and js interact with eachother are a fucking kludge. The only way it makes any sense is with the understanding that css and js are tacked-on technologies that have influenced the evolution of all of them for a while now.
If we were to recreate the language(s) of the web from scratch at square one now, knowing what we know now about what we want from it, but without our minds being influenced by the tech structures that we do have, it would be a completely different beast.
We're still stuffing applications into a document format, when I build for the web I feel the pain of design decisions meant to conform with the realities of what came before.
When I was ten I thought HTML was too complicated because I tried to read a tutorial in one go, then make a website. Turns out you can't do that.
I actually had a conversation with our team at my company about this very problem. The idea was there are SO many frameworks, it already has become a crutch for developers. It takes the thinking out of coding for you. Then what happens when you need to build something from scratch? You'll be totally lost.
IMHO, This person is on another level of lazy.
Not a good plan; then again, not a good general attitude from a technologist.
In my experience, there's a low signal to noise ratio when learning HTML/JS/CSS. A lot of it is learning hacks, as opposed to getting a general sense of how computers work. Flash/AIR are very good in this regard. If Flash disappears tomorrow, I don't think his skills would go to waste.
First, "Flex/AIR", as you say, doesn't make sense -- there is no such thing as "Flex/AIR". Flex is one thing (a bunch of open-source code), AIR is another (a bunch of runtimes). You can't just throw a slash between them and call them the same thing, because they aren't, and indeed Adobe's roadmaps for both are completely separate and in this case divergent. To those who aren't familiar with the Adobe stack, it sounds like you know what you're talking about, but to those who do, you just sound like yet another uninformed FUD-spreader.
As an ActionScript framework, Flex is only "dead-end" insofar as the Flash player itself is dead-end, which at near-total penetration on the desktop puts it about as far from extinction as anything could be. Flex per se, as a Flash-targeted framework, is only dead-end if someone builds something better to replace it, which also doesn't appear to be happening anytime soon, as those of us who do choose to use Flex generally happen to like working with and contributing to it. And last I checked, open sourcing a project was anything but sentencing it to death by definition.
Despite abandoning Flash for mobile browsers, Adobe is actually redoubling its efforts around Flash for the desktop and the various AIR runtimes, which are, of course, extensions of the Flash player.
And not for nothing, but polygeek is already a Flash developer -- he's not "putting his effort" into learning these skills; he already knows them. He's merely complaining about the prospect of having to learn another way of doing something he already knows how to do and enjoys.
For my part, I'm equally experienced in both the Flash stack and in Web scripting, and I dig both; I love my Flex and love my jQuery, love JavaScript and the prospects (if only partially realized) of HTML5, and I've been around long enough to know that both have their applications and there are plenty of places where they don't even remotely overlap -- despite how often comments like this seem to suggest their interchangeability.
So yes -- if you're writing Web apps that'll have to run in mobile browsers, then obviously, you shouldn't use Flash. But Flash and AIR are not going anywhere, and Flex is there for your use if you like. That's a little closer to the truth than "Flex/AIR are dead-end platforms."
FWIW, I'm not responding at this length just because I think you're wrong and feel some need to correct you. As a consultant, fairly recently, I has a good-size project go less than spectacularly because some underinformed product manager decided to impose a "no stinking Flash!" policy on an application intended to run solely on desktops simply because she'd gotten the sense somewhere, God knows where, that HTML5 was trendy, and Flash was passe (and despite my having built several successful Flash projects for them previously). The problem, as I was forced to point out repeatedly as we went through the project, was that many of the functional and design requirements they'd set for it were tailor-made for Flash and Flex and trivial for them, but because they'd excluded it as a technology choice, the equivalent functionality without Flash would require considerably more time, be less uniformly compatible, and in some cases just couldn't even be done. By enforcing no Flash, they ended up with an inferior product, and all because of an arbitrary and unnecessary technical constraint. (And on the next project, they opened the door to Flash again.)
I too have been turned off by lightbox and slider plugins for jQuery, and find it easier to just come up with that kind of thing myself rather than jump into someone else's codebase.
You're suffering classic NIH syndrome. Take ownership of the library you use, jump in and get an understanding of whats going on there.
It will be quicker than re-inventing the wheel, and getting up to speed with an existing codebase is a skill that you'll need at some point.
Not sure about object introspection, but setting break points is pretty straight forward using console.trace()
Web development feels like black magic with the amount of hacking and kludging involved, after developing native apps. And not in a good way. And not because i lack understanding or anything.
This question has always bugged me.
As an aside, what increasingly bugs me is the number of programmers who seem to have bought the urban myth that "An green apple" is grammatically correct, and have proceeded to pepper their project documentation with awkward and incorrect statements.
A comment on the issue[1]: There is a bizarre urban legend of sorts that you're "supposed to" use "an" if the head noun in the noun phrase it determines begins with a vowel sound, rather than the first word in the noun phrase, giving rise to claims that "an green apple" is somehow "technically" correct. Here is a blog post of someone who seems to have gotten this idea. And here is the discussion on Language Log about that blog post.
In any case, the rule is that you use "an" if the next word begins with a vowel sound. Vowel sound is crucial here because many words that begin with vowel letters do not begin with vowel sounds (e.g. user) and vice versa (e.g. hour).
This makes it a kind of sandhi rule for "intrusive N" in English for indefinite articles, avoiding hiatus between the article and the following word.
[1] http://english.stackexchange.com/questions/152/when-should-i...
In all seriousness how it is pronounced can and does change depending upon where you come from.
Looking it up on Wikipedia says that the standard is ay-ch while the non-standard is haitch (which is a better way of spelling what I meant).
That is what a professional copywriter told me.
Anyway, maybe it's just a shitty tutorial, there are a lot of those out there. Doesn't necessarily say anything about HTML.
Regarding the specific point about breakpoints -- yes, you can set them. That's really not an issue at all. Come on, it's almost 2012.
I know HTML and a bunch of server languages as well so I'm covered if something would happen. I'm not going to say that flash is here forever but it will take a lot longer to disappear than you probably think, especially with the new 3d stuff.
html is all about a few xml tags. everybody can do it. I know some music bands, authors and politicians who code website learning basic html.
and I see some developers who ignores coding html because they think they're too smart to code a simple website. no comment.
So, let's breathe a little, and accept that if professionals can get called shrinks, we can accept that people have different vernacular for what we do. Hell, we don't have a single unifying title either. So, unless your proposing to call me by my professional title of "Interwebz Spin Doctor", take a second to realize that "html developer" isn't that bad.
There is HTML, and he is developing it.
I respect HTML coders and am aware of that they do fantastic job on frontend.
But nobody has to be talented HTML developer to build websites. It's stupid easy to do it. I'm a guy who never learnt HTML and am considered as a coder good at developing good websites.
Nevermind. I don't like this kind of pointless discussions. I don't like HN anymore.
You can't? You're the one that brought it up and whine about it.
> Nevermind. I don't like this kind of pointless discussions. I don't like HN anymore.
You realize you bring this discussion here, right? If you don't want to see it discussed here, don't bring it here.
If you see others bring it here, tell them to stop (as I did to you).