February 2010 Archives

How to Implement an autosorted Map in Java

| No Comments

A question someone asked on #Java prompted me to write the code to implement a Map which preserves insertion order by inserting any Serializable object (most Java objects you would want to persist implement this) and the current time as the key. Since Java Beans all implement Serializable by specification, you can have any sort of Java into this map and retrieved in insertion-order.

Strasbourg is not Westminister, Mr Farrage

| No Comments

Is Chile the New Haiti

| No Comments

A series of earthquakes have hit Chile. Thus far, it seems that Haiti's takes the cake. It's still early yet, so this may change.

This is my take as to why this is the case. The United States mounted a coup in 1973 in Chile and ushered in the reign of General Pinochet. In 2004, the United States is alleged to have engineered the overthrow of the Haitian government. I'd also imagine that there is a far larger Haitian diaspora in the United States that remembers the coup in 2004 than a Chilean expat community that remembers 1973. In a pure coincidence, the coup in Chile took place on September 11th

Is Yelp yelping its way to Disaster?

| No Comments

I am a frequent user of Yelp, the user-generated reviews site. So, it was with great interest that I noticed they are going international, starting with the United Kingdom. I hope they've done their homework though, as British libel laws are rather unique and aren't likely to be changed anytime soon.

Reblog this post [with Zemanta]

Frugality? There's an App for it!

| No Comments

How to Deal With Conflict

| No Comments

Lifehack has a guide to dealing with conflict. Human nature being what it is, conflict is guaranteed. But, in my customary summarisation, here's how to deal with it, in brief. Click through if you require more details:

  1. Don't make it personal.
  2. Get the Facts.
  3. Listen.
  4. Simple Assertion.
  5. Be ready to admit you're wrong.

A New Explanation of Asian Fetish

| No Comments

People tease me all the time about my taste in women. Now I can say, I'd like to be a golddigger and Asian women make more than any other, on average, save for Asian men in the United States.

How the CARD Act Changes Your Bill

| No Comments

Lifehacker links to the Federal Reserves guide to your new credit card bill. The piece points out the tool is flash, but is short on other tips on it.

How to Learn Better

| No Comments

I have never been one to nap. Just can't get to sleep, even at night. Now Lifehacker gives a cheat sheet for it as well. I shouldn't need to alter my behaviour to learn better. I feel I have figured out how I learn best in the last 30-odd years.

In Defence of Engineering

| No Comments

Movable Type Yahoo Authentication Broken?

| No Comments

A friend tried to use the Yahoo Movable Type comment authentication module and it didn't work. I'm not sure how to debug this. So, maybe someone who knows more about the package can point me in the right direction? thanks!

How to Find Wine Tastings

| No Comments

Lifehacker features LocalWineEvents.com, a site to find local wine tastings and dinners. Described as "the world's largest calendar of food, wine, beer and spirits events". They charge for posting, but not for searching for an event. Any attendee fees go straight to the event hosts.

Reminder Going Peer-to-Peer

| No Comments

I just uploaded a new iteration of Reminder. The big change from the last iteration is that the server starts automatically when you double-click the distribution file and the client pops up. Also, closing the client doesn't kill the server.

Barely Legal

| 1 Comment

Lovelier in Monochrome?

| No Comments

How to Secure Your iPhone

| No Comments

The iPhone is one of the most recognisable pieces of hardware anywhere in the world (which is part of the reason I don't have one, but I digress). That fact makes it a good target for a thief. The default password on these things is 4 numeric characters, which is almost laughable from a security perspective, but Lifehacker tells us that help is on the way in the form of this link, which I've tested on my iPod Touch and it works fine.

But We Hardly Knew Thee...

| No Comments

That's James Purnell, MP, yes, I know, "James who"? He also doubles as Brown's minister for culture, sports, and media. Which brings me to another point, while Chinese cultural accomplishments may amount to nil, at least we know they have a shedload of hits relating to it, and an obvious script, whereas our script is stolen from Italians, our mayor is the butt of jokes everywhere, and the richest man in our country doesn't even bother to carry around a British passport.

Text if you Want to... Text Around the World

| No Comments

On Lifehacker, there is a feature linking to voxox, a new sort of instant messenger. The killer feature, in my opinion, is the text messaging pricing, which is 2 cents international outbound SMS, 1 cent domestic oubound, with free incoming SMS from anywhere in the world! Problem is that I can't sign up. So let's see if they're customer service is as good as Ribbit's.

Getting the Layout of the Land

| No Comments

Reminder-System Clipboard Integration

| No Comments

The latest iteration of Reminder adds integration with the clipboard.

Success for Resumes is Quantitative

| No Comments

Lifehacker claims that using numbers on a resume will keep it out of the dustbin. Further tips are to be found on Yahoo.

Kindle goes Blackberry!

| No Comments

Yahoo BOSS Going Fee-based?

| No Comments

I have an as-yet-unannounced project utilising Yahoo BOSS. Now that Yahoo has announced a partnership with Microsoft, the latter has started to impose their business practises on the Santa Clara-based company. Ugh...

What the Middle East Needs....

| No Comments

I make no secret of my extraction. In case there's any doubt, I was born Muslim, to two parents, raised in Europe, save for a year, where I lived in the Lebanon. I feel this life experience qualifies me to write this piece on how to defeat al-Qaeda, Hammas, Hezbullah, the Phalange, and every other terrorist group that eminates from the Middle East.

The problems in the Middle East are numerous and very widely known -- the Israeli occupation of the west bank, the lack of respect for human rights in the region save for Israel and Turkey, and so on. None of which have nothing to do with Islam. They're human needs. The region has a demographic pyramid, with a large number of young people and a smaller proportion of old people -- the reverse of western Europe. It's unemployment rate is also quite high, again, unlike the west. Now this is common throughout the 3rd world, but the key point is that the Middle East is rather well-connected. The unemployed youth tend to be well-travelled, often having family homes in Western Europe or the United States. They also tend to be numerous homes.

The point of the above is to give an idea of how integrated the region is with the rest of the world. And the reverse? There's a steady stream of western businessmen who occupy limousines down the Corniche in various cities in the region, paved with the proceeds of black gold, built by western companies, who employ western workers, and send their profits back to their shareholders residing (guess where?) in the west, of course. The youth know this. They are frustrated. They need an outlet for their frustration. And this is what's missing.

See, I'm frustrated as well, with my government not representing my views, using my taxes to build bombs that destroy my grandparents' homes. Except that, in the west, whether in Britain, France, or the United States, I can express my frustration by writing my local MP, calling into his radio show and getting responses from the other callers, or taking to the streets. All of which, are impossible in most of the Muslim world. If I have a grievance, I don't need to resort to setting tyres on fire. But even property destruction is preferable to killing people to get attention. When I start arguments with the likes of Rodney, the city banker in London, or Garry the Zionist in Kentishtown, it can get fiery rhetorically, but it does serve as an outlet for my frustration. The youth in Saudi Arabia, the Gulf, or Egypt have no such outlet. And so they keep the frustration inside, eventually it reaches fever pitch and results in an explosion (figurative, but also literal in some, unfortunate cases).

So, turning the equivalent of Beirut's Martyrs Square in Cairo or Riyadh into a sort-of Speakers' Corner would make for a good start. Set aside an afternoon every week (I'd suggest after Friday prayers, because that's when the people have the most pent-up anger), have the security services monitor the area for violence, but just monitor it, as a deterrant. Let anyone speak, on any topic they'd like, for as long as they'd like. If this is regularly-scheduled, attended and has regular participation from the population, it will significantly reduce the incidence of the youth going and joining groups such as those mentioned above.

See, it's not that Muslims hate America because of their freedom. It's the keen awareness that it would be so much better if they had freedom in their own countries.

Top 8 Ways to Deal with Critical People

| No Comments

celes posts 8 Ways to Deal with Critical People, summarised below:

  1. Don't take it personally
  2. Understand their intentions
  3. Take it as honest feedback
  4. Address your underlying discomfort
  5. Don't solicit opinions from such people
  6. Ignore their comments
  7. Show them kindness
  8. Avoid them

Is Your Life Happy Or Interesting?

| No Comments

Found on Penelope's weblog, a test on whether one's life is happy or interesting. Questions below, my answers after the flip:

  1. Did you relocate away from family for a better job or experience?
  2. Did you relocate to be near family?
  3. Are you nationally recognized as being great at doing something or do you have nationally-recognized expert knowledge in something? Or are you reorganizing your life in order to achieve this end?
  4. Were you a happy child?
  5. Do your friends pray?
  6. Do you need your kids to go to the best schools?
  7. Do you have fat friends?
  8. Do you have an opinion on Picasso?
  9. Do you have 3 friends who are born-again Christian, Jew and Muslim?
  10. Are you a Republican?
  11. Do you think Christmas is a national holiday?
  12. Have you been to a therapist?
  13. Do you know the difference between $70 eyebrows and $20 eyebrows?
  14. Can you tell a real diamond from a fake?
  15. Have you tried on a pair of $200 jeans?
  16. Do you think this quiz is bollocks?
-8 ~ -3 means that you value interesting-ness vis a vis happiness. -2 ~ 2 means that you're well-balanced, or uninteresting, the verdict is still out. 3 ~ 8 means you value happiness over being interesting.

How to Track Your Finances in Real-time

| No Comments

While I know of banks who offer SMS alerts when you charge to your card, Makezine's post is an even better idea. Allow me to riff on the idea a tad.

I would use openmoko-compatible hardware -- a GPRS chip, and a display, in a credit card form factor. The software would just need to pull a balance from someplace like Mint whenever a charge is triggered and display it on the LED, where the name and credit card information would be written. I should see if there's a hackspace where I could find other interested engineers.

How to Set Your Agenda

| No Comments

Lifehacker was alerted to a printable to-do list. It's a Word document, which I have converted to ODF and placed here. Enjoy!

Cleaned Up Reminder

| No Comments

Kassourri sent a missive whilst I was sleeping that Reminder has some debugging messages left in that should not be. I've cleaned it up and uploaded an updated version. Functionality should remain the same since that last iteration. Let me know if you experience issues.

Reminder Updated

| No Comments

I updated reminder once again. I realised that since messages are logged serverside anyway and can be viewed, I don't need clientside comboboxes. You should also note that it now logs as XML. To get this working required a couple of workarounds for shortcomings in the Java 1.6 logging package. First off, the XML generated from the JDK has an invalid XML header (both the DOCTYPE and the encoding of the file) and I know the number of pending bugs is quite large and that Sun is being acquired by Oracle. So, it's a pretty safe bet that I will get married before the bugs are addressed by them. The source code for the XMLHandler is after the flip with the two fixes I outlined above.

How to Deliver a Presentation

| No Comments

I have previously noted that I'm a member of the Toastmasters public speaking club. Their method seems to focus more on delivery rather than Lifehacker, which links to a piece on Malcolm Gladwell's presentation method, which stresses content. Personally, I feel that content is easier to get right than delivery. So, my own recommendation is to practise delivery, projection, articulation and clarity of speech.

Phishing Flowchart

| No Comments

Farsi Gangster Rap

| No Comments

How to Mount Your 3G iPod Touch as a Drive

| 1 Comment

One of the shortcomings from Apple's 3rd generation ipod touch is that it doesn't allow you to mount it as a hard drive. The hackers created iPhone explorer to solve this problem and Lifehacker found it. It's a free download for Macintosh as well as windows and it requires iTunes.

Top 3 Types of Government Waste

| No Comments

Tom Schaller, who has still not responded to my email, outlines 3 types of government waste based on a question in an NBC/Washington Post poll. The poll reveals that 53% of those polled believed the government is wasting money, but did not dig further. I will list some directions that they could have gone in.

Some of this percentage is due to a failure of understanding what the point of programs is. Specifcally cited by Dr. Schaller is welfare. While it is the general concensus that it has failed in its aim to eradicate poverty, eradication is not its aim; rather it is reduction of poverty, a metric that's far more difficult to quantify, in the same way that jobs saved vs. jobs lost is difficult to quantify. While I'm opposed to spending so much on defence myself, I do see the jobs that are created in this country when we build bombs to destroy my family's ancestral homeland. Anyway, the top 3 types of government waste are:

  1. Ineffective spending
  2. Inefficient spending
  3. Inappropriate spending
I do think that if we had better metrics from government, the poll numbers would be better.

Top 9 Ways to Overcome Shyness

| No Comments

This may come as a surprise to some readers, though not all, but I am shy. Which isn't the same as introverted, which I am as well, but shy. Lifehacker points us to Dumb Little Man, who tells us how to overcome shyness:

  1. Use your subconscious -- repeat affirmations (I think that's the right word, but Midori will chime in if I'm mistaken).
  2. Surround yourself with positive, supportive people.
  3. Expand your comfort zone.
  4. One step at a time.
  5. Don't take things so seriously.
  6. Shyness is pride.
  7. Don't over-analyse
  8. Be comfortable in your own skin
  9. Read the right books.
For myself, I do tend to overanalyse things. The piece notes that It's hard to find [positive, supportive] people, so I guess that is a numbers-game. As for the right books, I wish someone would point them out. Any ideas, Charis?

Top 9 Ways to Build Relationships

| No Comments

Life Optimizer gives us tips on building relationships. My customary summary follows:

  1. Ask about their families, their pets, or their significant others.
  2. Talk about their interests, hobbies, or current events.
  3. Give small token gifts.
  4. Give personalized gifts.
  5. Get involved, bring ideas.
  6. Ask good questions, then listen.
  7. Always start with a positive introduction.
  8. Be comfortable, be real, be authentic.
  9. Reach a little further, out to their significant others
The biggest problems for me are discerning what people's hobbies or interests are, and reaching out to anyone.

More Election Funnies

| No Comments

How to Boost Your Intelligence 30%

| No Comments
Watch live streaming video from tedxsf at livestream.com

All in the Words

| No Comments

I strongly believe that the devil (or God -- no not Alan Shearer) lies in details. Details like a changed word in a speech can give a clue as to true desires. This is true, especially for politicians. Obama's recent reversal of words from "insurance reform" to "healthcare reform", so fellow readers, fear not, the American variety of NHS is not yet dead.

People's History of the United States

| No Comments

About time, the People's History of the United States is now online at History is a Weapon. Will read and review it, sometime in the not-so-near future. :)

How to Pick Locks

| No Comments

Lifehacker tells us how to pick locks. Apparently, the most trivial approach is "The easiest approach is to grab a paperclip and tension wrench. If you don't have a tension wrench handy, a very small hex key (roughly the same diameter as the paperclip) will do in a pinch". You can get your own hex key at Amazon for $10~$20.

Why is London better than New York

| No Comments

The Ultimate Cooking Utensil

| No Comments

When I first moved to San Francisco, my aunt insisted I get a rice cooker (apparently, it's a requirement of all South Asians in America, which she is and assumed I would be as well). So I did, and it currently lives on top of my refrigerator and hasn't been used since purchase. This may soon change, as lifehacker and the New York Times have conspired to make me use it. When I do, I fully intend to thank my aunt, but that would mean calling her, and I lost her number, oh well.

How to Upgrade uTorrent

| No Comments

Lifehacker announces that uTorrent has been upgraded to version 2.0. I found the upgrade a little tricky though. The application is running while my netbook is on, and so whenever I clicked on it, the app would pop up. Apparently, you need to explicitly quit the app and then run the installer after.

George Bush Found Hezbullah

| No Comments

How to Blast Away a Blue Mood

| No Comments

Dumb Little Man writes a few ways to improve your mood. This is a rather long bit, so my summary does not do it justice. I do recommend clicking through. Regardless, I know some of you are too busy to read anything more than a numbered list, so here you are:

  1. Indulge in a 15-minute massage
  2. Cancel an engagement that troubles you
  3. Spend 10 minutes doing something you've always loved
  4. Book a treat for yourself
  5. Write a 5-point business plan for your pet idea
  6. Get outdoors

Connect with me


qrcode
Add me on AOL
Hasan Diwan

Follow me on Twitter
Ring me at +1 6502844111
See my photos
How about some analytics?

Twitter

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.