HN user

alan_p

31 karma
Posts0
Comments12
View on HN
No posts found.

I started with PHP and I wouldn't recommend it. It teaches you horrible habits and its type system is equally confusing if you get started or if you come from another language. Plus, you have that heavily polluted global namespace, a half-assed class system (objects are special, classes are special, primitives are special -- in Python the experience is closer to "OMG I've been using objects all along!" (like in those movies where the protagonist suddenly realises the shoes weren't magical, "the magic was in [him]") whereas in PHP you actually need to understand a completely different approach to what you're used to.

And don't get me started on naming conventions. Sure, you can adapt to PHP's inconsistencies, but ideally the first language you learn should be reliable and consistent.

BESIDES: if you learn a web language, you have to learn HTML first. And if you want to learn HTML these days, you also have to learn CSS and then JavaScript isn't far off either. In short: you'll have to learn a whole lot of stuff just to get anywhere. If you start coding in a shell and eventually start on GUI code, you only have to worry about what it all looks like on YOUR machine (and if you want to share your code, you can simply (have your daddy) make sure the other person has all the necessary modules in place).

Python comes with a turtle module, which means you can do all the neat drawing stuff you could do in Logo back in the days.

Also Python's interactive console provides two helpful functions: help and dir, which let you stay in the console even when you have to look up documentation, check properties of an object or find what else is contained in an imported module. There are other shells for Python that provide other functionality like saving your session's input in a file so you can actually write entire programs in Python for later use.

Also there's http://www.inventwithpython.com/, which is aimed at children and lets them create simple games to see results early on.

My first programming language was PHP at age 15, so I never had to make the jump from BASIC, but I've seen people stick with BASIC way past its expiry date just because they were used to it, becoming increasingly frustrated with its limitations. I think Python has the advantage that you don't easily hit a wall like that because you are writing in a "real" programming language from the get-go.

I think the book would definitely become a lot more interesting that way.

Chapter 1: Stacks

Chapter 2: Reverse Polish Notation

Chapter 3: Australia

Chapter 4: Penal transportation

Chapter 5: Slavery

Chapter 6: Prostitution

Chapter 7: Pornography

(and I wasn't even trying)

Eh. It's the good old escalation argument all over again. Sure, you can fix some problems by cutting the broken solutions and letting it escalate until it solves itself. Sure, the end result will be better than the status quo, but why would anyone ever want to go through the mess that would lie in between if short-term planning is so strongly encouraged (by human nature, if nothing else)‽

I hope you do take the time to read up on the background of such stories before commenting on them.

The reason they wanted to homeschool their children is because they are religious fundamentalists and consider the mostly laizist school curriculum "anti-Christian".

This isn't about some poor oppressed fellows who weren't granted the right to educate their own children. This is about two religious nutcases enforcing their religious beliefs and refusing to let their children receive unfiltered knowledge from a public school system.

If Germany had fundamentalist Christian private schools, they would've been fine with sending their kids there.

Gravedigging a bit here, but WTF dude?

I've started authoring websites in 1996 with just Notepad and I still hand-write my HTML on a daily basis.

The problem with HTML has been (and will be, for a long time) that there is no WYSIWYG editor that can offer quite the same quality as handwritten HTML.

In fact, if you're dealing with HTML from a WYSIWYG perspective, you're most likely ignorant of the language. The distinctions between divisions and paragraphs, between links and spans, are not something that is adequately reflected by an input editor purely concerned with visuals.

Just as the purpose of CleverCSS or it's Ruby predecessor is making it easier to write CSS by cutting down on the redundancy (and even by increasing the level of abstraction a fair bit), the purpose of SHPAML is making it easier to write HTML by cutting down on the redundancy of closing tags, angle brackets and the verbosity of divs, spans, ids and classes, thus letting you express more directly what you mean.

You don't have to like it. It's mostly a stylistic choice, but it means little overhead and can help HTML authors a lot by cutting down on the usual boilerplate. Just like frameworks and syntactic sugar make it easier for programmers (though the argument could easily be applied to them as well -- how dare they find it easier to code with less boilerplate if the actual writing is the smallest part in creating a functioning program).

Nay. I agree that recording private individuals in public places is dodgy (forbidden where I live, even -- and I am thankful for that), but police officers on duty do not fall in this category, especially when they are actively using force.

If you represent the public, expect to be watched when you act out your office in public.

If the video is put on YouTube and makes false accusations that don't hold up in court, you've got yourself a case of libel. It's simple as that.

It's all checks and balances. The state has to be checked on and balanced by the people. It's not that you shouldn't trust your police to regulate itself, it's just that it would be careless.

Linux Compose Key 17 years ago

Having an AltGr (third-level chooser) key on my native language keyboard, I was quite surprised to see Ubuntu (Linux in general? It's all in xkb's symbols layout anyway) have not only third level glyphs on way more keys than I was used to from Windows (AltGr+Q = @, AltGr+E = €, etc) but also fourth level glyphs (AltGr+Shift+...). Sadly a lot of them are pretty useless (e.g. the many "logical negation" keys -- I guess they used them in place of None).

Linux Compose Key 17 years ago

I've actually never used the Compose feature in Linux.

I prefer dead keys for accents for ease of typing (though it does tend to get hard to remember where you put dead_ogonek when you're not using it on a daily basis) so I naturally just set up my own xkb map. This ceases to be helpful when you're not only adding punctuation or alternate scripts but special symbols or letterforms as well (okay, so the Russian "i" could be on the "I" key for phonetic typing or on the "N" key for what it looks like, but where would you put "left arrow" or "double dagger" or even "logical not"?).

I think the same holds true for the compose key, tho: it's easy to remember "o + / = ø" (or was it "o + -" or even "o + |"? With the kind of redundancy in the compose table, all three probably work), but how do you deal with conceptually similar glyphs like "a with dot below" and "a with dot above"? What about glyphs that looks similar? Once you have to enter a glyph that's rarely used, you'll have to look it up -- and then it'd probably be easier to use a char map unless you're going to use it a lot.

It's perfectly legitimate. It's fine to speak to your child in a language that is not the official language in the country you live in. It's obviously more helpful if SOMEONE also speaks to the child in the official language, but that's besides the point.

Klingon is a constructed language, but it is sufficiently complex to be generative enough for actual use. Constructed languages aren't evil or irrelevant either -- look at Esparanto, which has a substantial amount of native or fluent speakers (more so than some "real" dialects).

Sapir-Whorf (heh, Worf) notwithstanding, we know that the "choice" of native language does not affect the child's cognitive capabilities negatively in any way (basically, as all languages are generative, you can express everything in any language -- if you lack the words, you make them up).

It's unusual, but it's hardly something to get your panties in a bunch over. There's no difference between speaking to your child in Klingon or any other minority language, constructed or natural. That's the beauty of it. The human mind is quite adaptive when it comes to utilizing language.

I've got a green colour impairment.

I'm not colour blind. I'm not even green blind. And I'm definitely not red/green blind.

If you're thinking about colour impairments, please keep this in mind: just because some people have a colour impairment that doesn't mean they are all colour blind (most of them aren't). They can see just what you can see, but some parts of the spectrum may appear paler and thus the nuances may be hard to tell apart. They'll probably have little problem telling two colours apart when they touch, but can't reliably recognise them as distinct when they're not.

It's okay to use colour in your design. It's even okay to use colours that are often problematic for people with colour impairments. It's not okay to RELY on them, tho. Especially if you rely on telling roughly similar colours apart (say, bluish purple and blue, or even dark red and dark green).

If you have to use colour as a signal, use another one as a failsafe -- use different patterns, borders or underlines in addition to different-coloured fills, outlines and texts.

The idea is not to sacrifice, but to enhance -- this is true for every form of accessibility, actually.

If you can't use strongly contrasting colours (i.e. different hue and value at high saturation) due to design constraints, simply make sure colour is not the only contrast you provide -- if all else fails just use markup to ensure the unstyled page still retains a contrast.

Oh, and don't forget to set your background and text colours in pairs. Even if you want to keep the default for one of them (white background, black text). This is not for accessibility alone, this is also for people like me who use a dark desktop theme and curse every time they see a form with black text on a (desktop default) dark background or a white background with (desktop default) bright green text on it. Like this very form I'm writing in -- good thing the web developer toolbar comes with a "ignore page colours" option.

Bullshit.

Copyright has a lot of problems and the lawsuits aren't doing anything, no matter HOW you decide who to sue.

Professional copyright infringement (e.g. companies using pirated software) is easy to spot and easy to persecute. It's also a serious issue because you're really talking about lost sales here, not just hypothetical sales.

Private copyright infringement (e.g. mom downloading some MP3s) is hard to spot and even harder to persecute. You can't talk about lost sales because the amount pirated is in no relation to the amount that could have been sold -- if you've got a 80/20 distribution between pirated and sold, it's absurd to claim 80% lost sales.

If you're talking about real profit losses for the actual producer (i.e. the artist, developer or whatever), private copyright infringement is negligible.

In fact, the low cost of private copyright infringement could be soothed even more if the producers would allow for easy ways of donation (PayPal, whatever): in many cases the "lost sales" were lost because the would-be-customer wouldn't have paid the amount asked or was simply not willing to take the risk of paying for something before knowing they like it.

Whether you like it or not, private copyright infringement is here to stay (and has been here ever since the invention of copyright law). You can't stop it. You only have the choice between accepting it as a fact of life and trying to work with it (viral marketing, commercial support for Free software, live concerts, etc etc), or ignoring the social costs of your actions and trying to punish all the "evildoers" one-by-one making examples of the students and grandmas you actually manage to draw into courtrooms.

Publishing companies are not going to die over this, but their role will deflate back into what it had been before the record industry / Hollywood boom: as a service provider to the real artists, offering to do the marketing for them, arrange concerts and publish their work in physical form. It's only natural for RIAA and MPAA to try and tear down civil rights in their dying throes, but that doesn't make it any more ethical, no matter what the legal situation says (which they have nicely shaped according to their interests in the past, I might add).

Vive la révolution!