- Make Map iterable.
That is, Map<K,V> should extend Iterable<Map.Entry<K,V>>, such that Map.iterator() behaves exactly like Map.entrySet().iterator() - it would save the extra ".entrySet()" in all those for-each loops, as well as making it easier to switch data structures from a List or Set to a Map. - Speaking of for-each loops, they should check for null in their iterable part. It lets you replace this code:
Iterable<E> collection = methodThatMayReturnNull();
with this, which seems to be sensible and much cleaner:
if (collection != null) {
for (E element : collection) {
//do stuff ...
}
}for (E element : methodThatMayReturnNull()) {
//do stuff ...
}
Showing posts with label Opinion. Show all posts
Showing posts with label Opinion. Show all posts
11.19.2009
Little annoyances in Java
I have a couple proposals for some syntactic sugar in Java, that fix a bunch of minor annoyances.
5.22.2009
A new model for browser extensions
I'll open with my standard disclaimer: I haven't investigated this in any detail, nor do I have any experience developing browser extensions. That said, this is a blog - rampant, uneducated speculation is my speciality.
Mozilla is releasing a new extensions framework named "Jetpack". The main feature of this API is that installing an extension would not require a browser restart. Now, its still in early beta, and the security framework hasn't been completed yet, but, if I may speculate, this may be a useful model for browser extensions. The main thing that catches my attention is that this appears to be an API of some sort - if I understand the current extensions model correctly, they basically work as patches to the browser, re-writing chunks of its code. (The last sentence implies that Jetpack will deprecate the current extensions model - as well as I can tell, that is not the case.) Now, back to this being an API - instant install/uninstall (I assume) is nice - a good security model is a must have - but, beyond that, I could see other browsers implementing Jetpack. Firefox is great, and I love its customization options, fair desktop integration, and good rendering - but it is a bit heavyweight - some of the webkit browsers coming up show promise, but the customization is a bit lacking - this could be a useful common ground. Just saying.
Mozilla is releasing a new extensions framework named "Jetpack". The main feature of this API is that installing an extension would not require a browser restart. Now, its still in early beta, and the security framework hasn't been completed yet, but, if I may speculate, this may be a useful model for browser extensions. The main thing that catches my attention is that this appears to be an API of some sort - if I understand the current extensions model correctly, they basically work as patches to the browser, re-writing chunks of its code. (The last sentence implies that Jetpack will deprecate the current extensions model - as well as I can tell, that is not the case.) Now, back to this being an API - instant install/uninstall (I assume) is nice - a good security model is a must have - but, beyond that, I could see other browsers implementing Jetpack. Firefox is great, and I love its customization options, fair desktop integration, and good rendering - but it is a bit heavyweight - some of the webkit browsers coming up show promise, but the customization is a bit lacking - this could be a useful common ground. Just saying.
4.30.2009
Let's Call it Bob Launches PC World Killer
One of my pet peeves is new product X is announced in a category where product Y is predominant, and the headline reads "Y killer X announced". (PC World is especially bad for this.) Thing is, X rarely ever kills Y - no matter how much endless hype it gets. Sometimes X isn't even meant to kill Y - they're designed to solve different problems, and fill different niches (The columnists hyping X are always disappointed later when it doesn't kill Y like they said it would - obviously they know better than X's makers what it was supposed to become). To anyone who disagrees with me here, please announce Let's Call it Bob as a Z killer in whatever medium you have access to, where Z is your favourite website - obviously, because its on the Internet, and has content, it can replace any news or opinion site, and the availability of comments makes it capable of killing any social networking site.
Thank you very much for reading tonight - we now return you to your regularly scheduled programming.
Thank you very much for reading tonight - we now return you to your regularly scheduled programming.
4.20.2009
Ham Radio Will Never Die
I am not a ham radio operator. I have never seen one outside of movies. I would not know what to do with one if it was handed to me. But ham radio will never die. If I remember rightly, it played a big role in Katrina cleanup, and just today I saw this story, about the recent cable cuts and subsequent Internet outage in LA:
Even worse, the vandalism affected the local police, fire, and ambulance services, as well as making it virtually impossible for tens of thousands of people to call these services in case of an emergency. (Local ham-radio operators jumped into action, fortunately, becoming a key communications medium between first-responder services and setting up way stations at strategic locations for people who might be experiencing an emergency.)Computer tech is too complicated - it depends on too many things - even I, a half-trained computer scientist, would be basically useless if forced to try and get something working on 40-year-old computer systems - I just don't know how things work at the low level (that to be rectified somewhat in this summer's classes). Internet, take this as your warning.
4.19.2009
That line in the sand
Chris Walley, over at News from Farholme (check out his Lamb Among the Stars series as well - its pretty awesome) just put up a post about how, in many areas of life, we draw a line in the sand, and keep thinking everything is ok, as long as that line isn't crossed, and we live with our heads in the sand sometimes (yes, I know, that's one sand metaphor too many - Dr. Walley is a professional author, I am not). Here's an excerpt:
In a complex world it is easy over issues of concern to mark a line in the sand at some particular point. You turn your attention elsewhere, constantly glancing back at your line in the sand and, as long as it remains untouched, you conclude that all is well. So, for example, I consider that everything is all right as long as I can walk down to the city centre in daylight without being mugged. There are many such benchmarks in society and in our lives. Indeed I suspect almost all our public and private morality is composed of a series of such benchmarks.
4.01.2009
Linux Foundation Attempts to Displace FAT
An interesting idea - that won't work. The Linux Foundation wants the industry to move to an open format for storage devices, rather than Microsoft's proprietary (and outdated) FAT. Which would work great - if Windows didn't run on ~95% of consumer desktops. You need Microsoft on board to switch USB drives, etc., off FAT. Microsoft earns royalty money off of FAT, and can use it as a lever to get smaller companies to pay them. Microsoft thus has no incentive to support anything but their own proprietary file systems in the Windows client. It'd be nice, but it won't happen - you give an 800lb gorilla whatever it wants, and Microsoft is definitely an 800lb gorilla.
3.13.2009
Cool ... wait a second ... ?!?
I just finished a good book - it has a neat view of what the world could be like in 30 years. I might have blogged about it before (my Google-fu says nay), but its a really well worth reading - there are some interesting, plausible ideas about the future of society, the environment, and the net. Then I got to the end of the book, where the author is writing his notes about writing a 50-year forward projection, and talking about the end of the Cold War as a current event ... wait a second. A check of the front cover reveals that it was published in 1990 - that's right - we're nearly halfway into the future depicted there, and its still a reasonable idea of what the future will look like. I would definitely recommend reading it if you get the chance - available on Amazon or possibly your local public library (they're wonderful places, incidentally - they even have music and movies nowadays).
And did you really think I'd reccommend a book without mentioning the title or author? Earth, by David Brin, is what you're looking for.
And did you really think I'd reccommend a book without mentioning the title or author? Earth, by David Brin, is what you're looking for.
1.20.2009
The Obama Inauguration
So, like half the other politicians, political pundits, and armchair statecraft enthusiasts on the planet (likely), I'm putting a post up about the Obama Inauguration (I haven't checked yet - why waste an opportunity to talk about something I'm completely unqualified for by doing research :-) ). A few of the people at work had CNN on at lunch, so I joined them and watched President Obama's swearing in and speech. He was obviously nervous (he fumbled twice during the swearing in, though I think the first time was the other guy's fault), though it didn't show on his face. His speech, IMHO, was good, but not great. It was eloquent, well delivered, and seemed to balance realism with inspiration fairly well, but nothing really stood out. (Well, besides the parts where my Canadian background snickered at the American-ness of parts of it - this inbuilt assumption that America is naturally a world leader, and needs to return to that state.) I think it set a good tone for his presidency, and he does look like he'll do, at the very least, a competant job, especially given the conditions he's been dealt. However, I think those who are expecting Obama to save America, and singlehandedly fix everything will be sorely disappointed. He's only human. His speech, though very applicable now, will likely not be remembered in 10 years - schoolchildren will not be memorizing it for decades to come, and, if I can measure a President by his inaugural speech (why not, this is the blogosphere), I think that while he may be what America needs now, he won't be very much noted a generation from now.
12.24.2008
An interesting idea
Here's an interesting idea, courtesy of John C. Dvorak - once higher bandwidth wireless routers become ubiquitous, allow a setup whereby you can share a smallish (say about 50 mbps) chunk of your bandwidth as an open connection, for the benefit of the general wired (unwired?) public. His point is that while wifi hotspots are more ubiquitous now than they used to be, there are fewer open hotspots (as is good security policy). This slice of open bandwidth would be sandboxed off of the rest of the network, and would have bandwidth caps, to prevent abuse, but would be left otherwise unencumbered - a way to share internet connection, and provide an easy public service - it would certainly increase the usefulness of portable wifi-enabled gadgets (iPhone, netbook, Nintendo DS, laptop, I could go on ...) by about an order of magnitude, and reduce people's reliance on expensive, slow cell phone data plans, perhaps give the telcos a bit of competition in that field (which is always good - telcos are pretty evil, and could use some competition to make them listen a bit better).
12.10.2008
Widescreen Web
I've been doing more of a tiling layout to my desktop lately (when I have some free time to risk tanking my computer, I'm going to try a tiling window manager) - this is fairly simple though - taskbar along the bottom and left side, MSN bar along the right, and my web browser in the middle. Now, this is nice, keeps all the information I want at once accessible (or at least most of it - tiling is good, overlapping windows are pointless, but that's a post for another day) - thing that's a bit weird is, there are quite a few webpages (facebook, apple's page, etc.) that are wider than that window (which I measured at 948 px, window chrome included) Now, certainly I'm not saying that web pages should all fit in 640x480, but the fact that a lot of common ones want 1000 pixels or so across seems a bit high - that's the entirety of many screens - what if I want to look at other things simultaneously (like IM conversations, or the controls to my music player, etc.)? Anyway, I declare this "hug a web developer day" - and then remind them that interface scalability is considered a good thing :-)
12.09.2008
More Coalition Drama
Well, Bob Rae and Dominic LeBlanc have dropped out of the Liberal leadership race, leaving Ignatieff uncontested to lead the party - this is totally about the whole coalition thing - my reading of it all is that the leadership candidates don't have confidence in Stephane Dion, and want to replace him before they pull the pin on a non-confidence vote - Ignatieff is the only one of the three candidates who has much credibility on the economic front - Rae is still hurting from when he was leading Ontario during a recession, and LeBlanc is just too young and new yet. From what I hear, Ignatieff actually wants to wait and see what Harper comes out with in his budget before deciding whether or not to overthrow the government (which sounds fair to me) - with luck all this ridiculousness will blow over soon, and our government will get back to the business of governing, not being the butt of Jon Stewart jokes (admittedly, its slow news in the states, with Bush on the way out)
12.08.2008
The Coalition
So, in case you've been living under a rock for the last week, Canada's three opposition parties have signed a deal to overthrow the Harper Conservative government. They propose a governing coalition of the Liberals and NDP, with the Liberal leader (currently Stephane Dion) as the Prime Minister. Prime Minister Harper, in response to this proposal, got the Governor General to suspend Parliament until January. Now, while I strongly dislike Harper's government style, and think people underestimate Mr. Dion, I'm not quite sold on the coalition idea. Their entire point is that the Tories aren't doing enough, quickly enough on the economic crisis. However, their own plans have been somewhat slow coming out (announce downthrow of government first, release plans later), and switching governments mid-Parliament would certainly slow down anything getting done. Also, as one of my good friends once said, "you can trust Stephen Harper to do exactly what will get him the most votes" - crashing the economy would get him chased out with a stick next federal election. He's also trained as an economist, and from what I hear did fairly well at it. So, while I don't really like him, and think the opposition parties ran on significantly better platforms last election, I won't complain if Stephen Harper holds on to government, as long as he gets some good things done - on the flip side, if the coalition gets into power, and then makes a hash of things, I may just vote Conservative next election.
10 000
Well, I haven't posted for a while (can't believe I completely missed the federal election ... I probably should say something about the "coalition" in another post), but I realized something this week I thought I should say: I could live quite comfortably on $10 000 a year. I was looking at how much I've spent over the last four months, and, discounting tuition, it was only about $2 500. This isn't trying to be holier-than-thou, it just made me think about how much we demand as "basic necessities " as a society. For one person, in the size of city I live in, the poverty line is about $17 000. Sure, I don't own a car (which would probably eat up another few thousand dollars a year)), but in the city I live in, I don't have to - public transit (which is very good here) and my own two feet serve me well enough (Here's a link to a guy's blog about why cars are largely unnecessary - he's full of vitriol, absolutely spitting acid, but he makes some decent points nonetheless, I think). My furniture may be second (or third) hand used, but it gives me a comfortable place to sit, and somewhere to store my stuff. I have money for real food with real meat and vegetables, and even entertainment (cable TV, the high-speed internet connection I am typing this on now, the occasional movie, dinner out, etc.). Sure, people usually want a higher quality of living - bigger, nicer places to live, and newer, better stuff - when they get out of university, but I wonder a bit why - do I really need that? We hear newscasters talking about the present economic crisis until they're blue in the face, and I know a lot of people are in real pain from it - lost jobs and bankruptcies - but we really brought it on ourselves as a society. We've let capitalism and materialism run out of control, and forgotten the value of hard work, savings, and making things to last (not saying I haven't done this too, by the way). I just hope it doesn't take another Great Depression to make us all remember.
5.02.2008
MSN is terrible (a rant on IM tech in general)
I have come to the conclusion that the MSN Messenger protocol is terrible. This because there is not a single implementation of it that works nearly as well as any implementation of the competing protocols - even Windows Live Messenger drops the connection or fails to sign in sometimes, and that comes straight from the source. (Incidentally, meebo.com (which is pretty much text-only) is fairly good - its been a while since I tried Trillian, but I don't remember any problems with it either (though it is also limited in feature set)). I've tried aMSN - it's got the same problems, but worse. Kopete, my primary messaging program, logs into my GTalk and AIM accounts almost instantly, but usually requires two or three pushes to log into MSN (and even then, takes a few seconds). Now, considering these experiences, I put the blame for flaky MSN performance on the actual protocol - admittedly, AIM and Jabber (GTalk's base) are more open, so external developers will have an easier time implementing them, but the fact that even the official Microsoft client is flaky lends support to my theory that the fault is in the protocol.
Why does this matter, you ask? I live in Canada - the most common messaging protocol in Canada? MSN. The solution: Microsoft does one of their major updates, that forces everyone to move to the new messenger, or not be able to talk to anyone (it has happened) - this update will include a backend update to a completely new protocol. Base it off something like Jabber (which is open-source, and stable), and open-source the extensions they add to it to support all their features. This should give them a stable base to work from. Also, work with Google - make it interoperate with GTalk (also Jabber based) (IM should be like email or the phone system - any vendor's product can talk to any others - this would be a step in the right direction). (Incidentally, I haven't used it for a while, but I loved the UI on the Google Talk desktop client - if they released a Linux version that could talk to MSN, I'd ditch Kopete in a second).
Anyway, that's what I want to see in IM tech - anyone else have anything they wish Microsoft (or AOL, Yahoo, or Google) would do?
Why does this matter, you ask? I live in Canada - the most common messaging protocol in Canada? MSN. The solution: Microsoft does one of their major updates, that forces everyone to move to the new messenger, or not be able to talk to anyone (it has happened) - this update will include a backend update to a completely new protocol. Base it off something like Jabber (which is open-source, and stable), and open-source the extensions they add to it to support all their features. This should give them a stable base to work from. Also, work with Google - make it interoperate with GTalk (also Jabber based) (IM should be like email or the phone system - any vendor's product can talk to any others - this would be a step in the right direction). (Incidentally, I haven't used it for a while, but I loved the UI on the Google Talk desktop client - if they released a Linux version that could talk to MSN, I'd ditch Kopete in a second).
Anyway, that's what I want to see in IM tech - anyone else have anything they wish Microsoft (or AOL, Yahoo, or Google) would do?
Ninety-six Percent
A quote on Vista SP1, from All About Microsoft:
Ninety-six percent of new system runing Vista have all their drivers just working out of the box.What about the other four percent? These are new systems.
4.27.2008
4.12.2008
Messages from the future
You know, if I could get a message from myself, twenty years in the future, and it told me that I never owned a car - I'd believe it, I think. (Providing the message from my future self could authenticate its sender reliably - I strongly doubt the feasibility of time travel) - But about the car - I wouldn't mind owning a car, I have my license, I like driving, and I fully expect to own one at some future date - but I wouldn't be surprised if I never owned one. Back home, I could always borrow my parents - living in a university town, foot and public transit suffice to get me around - a car just isn't worth the expenditure. I can see that not changing though - gas is only getting more expensive - unless a viable alternative to petroleum-fueled internal combustion engines emerges, owning a personal automobile will soon become infeasibly expensive. Its going to make changes - one of which will be the fall of the small automobile - better dust off your bicycle helmets.
2.22.2008
A few political notes
So, just quickly, American presidential race - I still want Obama to win, he's got a lot of momentum, and there's rumblings about Hillary's race being in trouble. On the Republican side, McCain has it pretty much wrapped up, though Huckabee is staying in it. The Democrats are going to win the election anyway.
On the Canadian front, the election rumblings are dying down, as the Liberals and Tories have made a deal on Afghanistan pull out. It's not set in stone yet, but its looking good. What I think more interesting, is that, in a recent poll, the Greens are polling even with the NDP - I'd like to see them win some seats in the coming election, and I think they may be able to manage it. (The Conservatives are near majority-government level support - not a bad thing - Harper is competent, and has done a good job as PM)
Peace
On the Canadian front, the election rumblings are dying down, as the Liberals and Tories have made a deal on Afghanistan pull out. It's not set in stone yet, but its looking good. What I think more interesting, is that, in a recent poll, the Greens are polling even with the NDP - I'd like to see them win some seats in the coming election, and I think they may be able to manage it. (The Conservatives are near majority-government level support - not a bad thing - Harper is competent, and has done a good job as PM)
Peace
Reaction: Microsoft's new open-source pledge
So, Microsoft is giving am bunch of stuff away for free - firstly, free development software for students - Visual Studio Pro, SQL Server Enterprise, etc. As a student myself, this is pretty shiny - not sure if I'll take them up on their offer - not much into .NET, and mySQL has got some decent DB software (I like Linux better anyway - really, for anything but .NET, Linux is a better devel environment) - but its nice to know I've got the option. The only kicker I see there is once I graduate, said multi-hundred dollar pieces of software will cease to be free, and if I end up using it, I'll be stuck with old versions.
Other news: Microsoft is making big openness pledge - its opening up API's for many of their big money products, and letting plugins into Office to use other file formats. Now, commentators are flaming Microsoft for this being a low business ploy - the Office announcement came one day before they were being evaluated for (highly lucrative) open source accreditation on their Office Open XML file formats, and the APIs are free only for non-commercial use. Now, Stephen J. Vaughan-Nichols (who, I gotta say, is a bit of a FOSS zealot) said "Microsoft isn't offering open source a new opportunity, it's offering open source a trap." I wouldn't go that far - sure, that means that any commercial open source companies will have to licence Microsoft's technology - I say that's fair - open source is all well and good, but MS has a right to make money on their work. I predict the commercial companies will license APIs for better compatibility, some of that might trickle down to non-commercial implementations. But, overall, Linux, etc. will play better with Windows, etc. but things aren't really going to change - Microsoft will still spew FUD, the FOSS ecosystem will still have flaky and/or hacked integration with the MS ecosystem, and, in general, things won't be different.
This has been long, so, later.
Other news: Microsoft is making big openness pledge - its opening up API's for many of their big money products, and letting plugins into Office to use other file formats. Now, commentators are flaming Microsoft for this being a low business ploy - the Office announcement came one day before they were being evaluated for (highly lucrative) open source accreditation on their Office Open XML file formats, and the APIs are free only for non-commercial use. Now, Stephen J. Vaughan-Nichols (who, I gotta say, is a bit of a FOSS zealot) said "Microsoft isn't offering open source a new opportunity, it's offering open source a trap." I wouldn't go that far - sure, that means that any commercial open source companies will have to licence Microsoft's technology - I say that's fair - open source is all well and good, but MS has a right to make money on their work. I predict the commercial companies will license APIs for better compatibility, some of that might trickle down to non-commercial implementations. But, overall, Linux, etc. will play better with Windows, etc. but things aren't really going to change - Microsoft will still spew FUD, the FOSS ecosystem will still have flaky and/or hacked integration with the MS ecosystem, and, in general, things won't be different.
This has been long, so, later.
1.05.2008
Movie Review - Juno
So, I went and saw Juno a couple days back. I'd categorize it as a quirky romantic comedy about an unfunny subject, teenage pregnancy. Which, I must say, they treat well - without going into specifics, a lot of how things work out in the movie seems believable and more real-world than happy-movie-world. Also, the film is really funny. The style of humor is sarcastic, and relies heavily on odd, funny words and phrases (which is a good thing) (the sequence near the beginning where The Office's Rainn Wilson plays a convenience store cashier is especially good). The entire theatre (moderately well filled for a Friday evening) laughed out loud at multiple points. So, bottom line, the characters were quirky, but believable - you could see them inhabiting your own neighbourhood. The writing was funny, but still treated its less funny subject matter with some gravity. It was funky and funny and good. 3 1/2 stars out of 4.
Subscribe to:
Posts (Atom)
