Archive for the ‘Web Developer Articles’ Category

Java Apps

Sunday, September 2nd, 2007

One rather enjoyable activity to while away a few hours is cracking java applications. Setting aside the legality of such nefarious activities, it’s a very educational and entertaining hobby. Of course, I am sure that anyone who indulges in such activities will have the decency to at least purchase said product.

Java licensing schemes vary from the impressively convoluted with multiple points of entry, to the incredibly simple and childish.

IDEA for example is more of the former, interestingly enough, my first introduction to IDEA was through a challenge to figure out its licensing algorithms (back in the 1.1 days), I very quickly purchased a license because it was pretty clear that these guys really are rather smart.

On the other end of the spectrum, we have some novel approaches which often suffer from one fatal flaw. They have one clever bit of code that everything else assumes is uncrackable. Needless to say, a simple NOP here does wonders.

Funniest of all are apps which don’t even use public/private keys, but employ a simple built in algorithm to read in a license file. Simple reverse that section of code and you have a key generator.

Another ridiculous idea is the encrypted classloader approach. I know of two apps which use this. There’s something strangely satisfying about making the application itself do all the work for you and decrypt all the classes; using its own cleverness against it

Speaking of apps which encourage you to use their own cleverness, it really is rather surprising how many ship with the code they use to generate keys. I know of one very famous ‘must-have’ java desktop app that comes with a key generator built in, if you can find it!

In the middle we have a whole bevy of novel and interesting approaches, often combines in entertaining ways. For example, disguising public keys as something else, perhaps a class file. You could go one step further and have the classfile be actually valid and decompilable, with the key material being an offset into the bytecode. There’s always the approach of obfuscating the compiled code and transforming method names into java keywords, so you can’t simply use jad to undo it, this coupled with flow obfuscation will stop pretty much all casual poking around. However, anyone genuinely curious will of course be armed with a disassembler, and through practice have an automatic bytecode to javacode mapping built into his or her mind (or at least, enough to figure out what a particular chunk does).

Most interesting of all are those companies who for whatever reason, feel they don’t really need to enforce technical constraints on their users, and choose to simply rely on the honour system.

What is fascinating about all this is that while many people have been involved in coming up with all these schemes, nobody will talk about it (that I can see anyway). It’s understandable, of course, as this stuff is very much in the realm of ‘trade secrets’. So in many ways, it’s a solitary programming task that one can indulge in, but not really brag about, or discuss with peers. Of course for some, if you don’t get to brag about it and gain gratification through peer approval, it just ain’t worth doing.

Java blogs?! part 2

Sunday, September 2nd, 2007

Of course, this is insignificant when one considers the utter irrelevance and uselessness of the search facility. Just try searching for anything at all, and chances are you’ll have the same (usually irrelevant) page returned 5-6 times. Setting this aside, the actual blog meta-data is not indexed at all it seems. One would think that searching for ‘rickard’ should bring up his own blog first, but no, he’s nowhere in the list of results. Blog meta-data should be indexed, and given a higher score that general entries. I know javablogs uses Lucene so this is very trivial to implement.

Then of course there’s oscache being applied like a sledgehammer. It’s possible to configure oscache such that frontpage stories dribble in in a timelier manner, rather than the current spurt of 5-6 bursting in at a time.

The biggest problem by far though is that javablogs foolishly assumes that readers are responsible and intelligent. Some examples that this is clearly not the case:

  • Idiots who re-add their blogs every few days: This could be fixed by having a separate ‘refresh blog’ button on the edit blog, so all old content is discarded and it’s readded without showing up on the frontpage. Mind you, this won’t stop the idiots who deliberately re-add in order to get more clicks.
  • Idiots who post multiple stories on multiple blogs to hog the frontpage: Namely, Gerald Bauer. This can be stopped by having a limit of 3 stories on the frontpage apply across ALL blogs that a given person has registered with javablogs, rather than a max of 3 per blog.
  • Java blogs?! part 1

    Sunday, September 2nd, 2007

    Javablogs is a fine lovely idea, and I’m sure pretty much everyone uses it to decide what they should think and say on any given day. Now, aside from the actual content, there are some highly irritating ‘features’ if you will that said site suffers from.

    First, let us consider the popular entries list. Enough idiotic items have risen to the top of the list to demonstrate that there’s absolutely no quality filter going on. The very idea is in fact fairly flawed, as one can rise up to any day’s list by following two very simple procedures:

  • Add your story around midnight
  • Have a snappy title The first can be addressed very easily. Instead of maintaining an absolute 24 hour range for popular entries, switch to a rolling range. As in, show the most popular entries for the last 24 hours. This ensures that the list doesn’t become completely empty every night, and that every story gets a fair chance of getting up there regardless of when it was sucked in.

    The second is less easily fixed, and would involve a lot more work. Some sort of moderation system would be rather neat (a la Slashdot).

    We also have that annoying navigational ‘quirk’ on entries. Clicking on a new story’s title will take you to that blog, but clicking on the ‘view’ link under it will….also take you to that blog! If you want to read the story on javablogs (for example, for any freeroller story), you in fact need to click on ‘details’. Nevermind that ‘view’ will also show you details. Some sort of visual cues as to which is which would be nice.

  • Working with JDK part2

    Wednesday, August 22nd, 2007

    How hard is it really to install lightweight pure Java DB? We have mckoi, we have hsqldb (in its various incarnations), and we even have a halfassed one from Apache (Derby). All of these (except derby, funnily enough) are very easy to download and install, and are perfectly adequate for testing and playing with and the odd bout of sexual experimentation for the curious.

    In ALL cases, this should NOT be in the JDK. Why should one DB be blessed above all others? Did we learn nothing from the crimson fiasco? Mark also naively claims ‘Vendors of little DBs are already threatened by Derby whether or not a copy of it is co-bundled with the JDK. I don?t see how doing that fundamentally changes the picture for them.’ A clearly ludicrous claim; just look at how successful Tomcat is.

    The branding of the whole thing is equally ludicrous. JavaDB? What next, renaming Glassfish to The Java Application Server and making obscene lawyery gestures at anyone wanting to refer to their appserver by that name?

    I’m one of the few people I know who will publicly admit that he’s a Sun fan. I think they’re an excellent steward of Java, and have done a remarkable job in every way (except marketing of course, I can’t think of a company that’s more incompetent in terms of how they present themselves to the public or of the ludicrous stuff they seem to push).

    How out of touch do you have to be to be ‘honestly surprised at the reaction to all this’ according to Mark? Have you people lost all respect for what we love and care about our platform, and felt that for the sake of consistency, you should whore the rest of the JDK and sell all your products NetBeans style? Come on, surely there are enough technically minded people still at Sun, who have some say and can prevent this travesty from taking place?

    Working with JDK part1

    Wednesday, August 22nd, 2007

    In a rather perplexing move, it’s announced that the Java 6 JDK will include Derby, the turdy little unwanted IBM poop plopped onto Apache (about par for the course, since large swathes of Apache seem to exit solely as an IBM marketing tool.)

    What’s perplexing about this decision is how incredibly arbitrary it seems. I have yet to see a single rational justification of its inclusion, even from within Sun or from the community at large.

    It’s one thing to suffer from the tyranny of the masses. We have plenty of cases of that in Javaland, do we really need to now add arbitrary bizarre decisions that not only pop up out of nowhere, but also have nothing at all do with the community?

    Honestly, not even the JDK6 Expert Group decided on this addition. It’s literally as if someone at Sun woke up one day and thought ‘you know, I miss the old days when we could add random shit to the jdk without all this community and expert group nonsense, I’m going to sexually arouse myself now by doing just that’, in one of the most harmful public displays of nostalgia ever seen in a technical forum.

    I honestly cannot conceive of a single reason for this. It doesn’t even make life easier for anyone. You can’t rely on it being there since it’s not in the JRE, you can’t actually do anything with it since you have to ram various awkwardly shaped objects into unexpected orifices to create a db and manage it using derby’s amateurish and unpleasant tools. It’ll work out of the box much the same way as an Oracle 8 install CD can be considered functional.

    Now you’ll have to bend over and invite over a large group of chocolate log miners and perform things your mother would be very upset about just to upgrade your db. Of course, you WILL want to upgrade it. It has hundreds of open issues, and is clearly labeled alpha.

    Even if those issues are miraculously addresses in the next few months, we’d still end up with more IBM shit in the JDK. Honestly, when will people finally realise that IBM has never produced anything of worth, beyond genius marketers? How many times must I mention java.util.Calendar and java.text before people start listening?

    Agile’s Last Stand

    Wednesday, August 22nd, 2007

    It’s a little disturbing seeing the agile crowd at work. In a relatively short period of time, an energetic group with potentially something new to offer has quickly sunk into a oft-derided group of greedy consultant used car salesman types.

    Pair programming, TDD, XP, little bits of paper, incremental releases, smug turdy devs, all experimented with and eventually discarded like a used tampon. Pair programming is inefficient and wasteful when compared to individuals who don’t slack off, the little cards more often than not end up with the wrong things scribbled on them.

    Is it possible to fix all that? Sure, but agile isn’t the way to do it, because the practices it espouses do not lend themselves to easy adoption. It’s a high barrier that continues to punish, and never rewards its participants beyond that air of smugness and that perplexing ‘I just shoved a big dildo up all my orifices and its strangely alluring’ look.

    The reason for this disillusionment isn’t that hard to find. As many have noted, it’s rooted in the feeling of incredible disappointment when you realise that no time has been saved, your love life has not improved, and your customers are no happier when you follow this crap.

    Genuine techies don’t react well to religion, usually. The agile crowd has committed the cardinal sin of stepping over the pragmatism line into the realm of faith. We’re surrounded now by the debris and detritus of less than successful agile projects. Instead of questioning the agile practices that might have contributed to the failure, agilists will instead scream out that the flaw is in the implementation, not the principles. Whatever happened to the scientific method? Why are the principles now held to be sacrosanct?

    It’s that sort of attitude that makes normal people think that agilists are, on the whole, a bunch of greedy fuckheaded navelgazers more intent on group teenmasturbation than concern for fellow man. The irony of their very name is becoming apparent to all; there’s nothing agile about their thought processes or acceptance of external input.

    Just say no to agile. Say yes to sane practices that work for your particular need.

    Facebook vs Myspace disputes part 2

    Saturday, August 18th, 2007

    Many of the advertisers are extremely worried about offline marketing but complete fools when it comes to online marketing, ignorant of who visits Web sites and whyPaying attention to demographics could help.

    As an advertiser, in my opinion, Facebook users are more qualified to convert and more apt to buy a shirt, so I would go there before MySpace,

    Facebook can lure advertisers with its affluence, says Bill Tancer, general manager of global research at Hitwise, an online marketing analysis firm. His data backs up Boyd’s conclusions that Facebook users are richer than those on MySpace. Still, MySpace attracts so many more viewers that “there’s no way marketers are going to leave,” he says.

    NetPlus chief Neifield says she’s not paying too much attention to Boyd’s observations. Advertisers should look beyond demographics when placing ads and instead analyze online behavior like who visited other sites with similar content, who downloaded what or who clicked on which ads, she says. “It’s not very often these days that we buy based on demographics alone.”

    Facebook vs Myspace disputes part 1

    Saturday, August 18th, 2007

     Recently I’ve being reading some reports concerning MySpace users leaving for Facebook in droves, setting off speculation that MySpace is becoming the latest victim of fickle teens following the hot new thing.

    Teens in any high school across the country already know: Affluent kids from educated, well-to-do families have been fleeing MySpace for Facebook since it opened registration to the general public in September, while working-class kids still flock to MySpace.

    That could have big implications for advertisers targeting the coveted teenaged population online, three-quarters of whom have a profile on a social network. Both sites have been powerhouses for advertisers because of their huge, wide-reaching audiences, says Robin Neifield, chief executive of interactive marketing agency NetPlus Marketing. That strategy could change if the sites become more like the niche social networks popping up across the Web for groups of like-minded people from similar backgrounds.

    Estimated ad revenue for 2007 calendar year for Facebook is $125 million, $525 million for MySpace, according to research firm eMarketer. Together, the two account for 72% of all online advertising on social networks.

    There’s a reason why the “goody-two-shoes, jocks, athletes or other ‘good’ kids” are going to Facebook, says Boyd, who studies social networks and youth culture and made her observations based on formal interviews with 90 teens, informal interviews with hundreds more, and the perusal of tens of thousands of teens’ online profiles.

    Facebook launched in 2004 as a site for Harvard students. Gradually, it opened up to other college students, then to high school kids if a college student invited them. “Facebook is what the college kids did.

     Constant local news stories on predators targeting kids on MySpace further alienated the “good kids,” she says.

    Laser printers emissions

    Saturday, August 18th, 2007

     

     As you should be informed by now, emissions from office laser printers can be seriously damaging as cigarette smoke.

    Office workers breathing easy since smoking was banned in public places in the United States and the United Kingdom have new reason to worry.

    The average printer releases toner particles that can get deep into the lungs and cause respiratory problems and cardiovascular troubles.

    The team tested 62 laser printer models–all relatively new–and found that 17 of them were “high emitters” of toner particles. Despite using similar technology, office photocopiers do not emit particles, the team found.

    Several of the high emitters were Hewlett Packard jet set models, such as the 1320 and 4250, although eight Laser Jet 4250 series were shown to have no emissions, according to reports.

    The printer emissions data were discovered by chance when an investigation of office ventilation systems, carried out jointly between the university and the Queensland Department of Public Works, found five times as many particles indoors as those produced by traffic outdoors. Using an electronic sniffer, researchers traced the emissions to printers. The emissions were found to increase during the day, when printers were left on standby or in full operation.

    Following the revelation, Morawska’s team tested their own printers and moved the unhealthy ones away from people. The researchers are now calling for regulations on printer emissions. The study included Canon, HP LaserJet, Ricoh and Toshiba printers. The university had not released comprehensive results by the time this story was published.

    W3C Recommendations

    Tuesday, August 7th, 2007

    I believe that conditional comments within CSS should be discussed more so, than simply pushed aside just because the W3C and others don’t agree, as I feel people in support of such a feature have valid points.

    However, I don’t feel this post’s comments section is the place, so perhaps the IE team (or those over at WASP) could start a new post entry, with the aim of ironing out the pro’s and con’s in one place?

    The reason being, I feel that an IE BETA is the perfect place to trial it. If it works out, it should be included in the main build, if not, it can be removed before the final product is released.

    I am in complete support of W3C recommendations, but I do feel that just because they reject the idea of CSS CC, that the idea shouldn’t be put to bed.

    As far as I know, the W3C have no active role in syndication XML mark-up, RSS, ATOM, etc (please correct me if I am wrong here) but look where that has gone.

    While it would be great if all browsers supported the recommendations to the full, I think history has shown this isn’t the case, nor will it be for a long time coming, be it via lack of support, or just bugs (known and unknown).