Resume Tag Cloud

I was wondering how, the next time I need my resumé, I could convey to the reader that, as a hacker, I’ve been playing with a lot of tools and toys, but I wouldn’t necessarily call myself a pro of some of them (on that note, I cringe whenever I see people put “MS Word” in their using-spaces-as-indentation MS Word resumés). Just now I had the aha moment, a tag cloud! Things I know more will have bigger font size than things I’ve only played with a little.

A Google search shows that it’s not an original idea. Also, some people include every aspect of their resumés (not just their tech skills) into the cloud, I wonder if that’s too much clutter, I just want to show a prospective employer (or HR-person*) what I know and how much of it in a quick and easy way, the other things, like personal and educational details, s/he can read in the plain text version.

*) hopefully the HR-person is clued in the world of tech that they know what a tag cloud is…

My Tech Tag Cloud

Ajax BlackBerry C++ C CSS Confluence Eclipse HTML iPhone JIRA Java JavaScript Linux MySQL OS X Objective-C PHP Perl PostgreSQL Python Windows XML XSLT

Out of the Box.

So I spent 6 hours last night trying to fix a problem from MS OOBE. MS stands for Microsoft, and OOBE stands for “Out-of-the-Box Experience”, i.e. the “experience” you’re supposed to have when you take your computer out of the box and turn it on for the first time.

Well this time a friend did a system restore on his HP laptop, and the OOBE is supposed to install programs that are bundled with the laptop (30-day test version of MS-Office, yay, Norton Antivirus, more yay!), but it breaks because near the end it tries to execute some programs which are not even on the disk.

Yeah, great out-of-the-box experience, HP!

Kill All Quizzes…

Updated 2009-08-03

Well the script stopped working a while ago, and I didn’t bother to update it… but this evening I thought I would…

Intro

So, Facebook sucks, but I can’t quit it. Anyone want to look up the definition of “addiction”? The newly redesigned news-feed removed the filter-by-app feature and added quizzes. Stupid fucking quizzes!

Googling for a way to remove them, I stumbled upon this Greasemonkey script by pepcza. It’s very simple and clever, using <jargon>XPath</jargon>, something that I’ve never touched before. It works, but doesn’t catch all quizzes, it requires you to use Firefox and install Greasemonkey, and it doesn’t delete those dag-named quizzes on the second viewing.

So I decided to make a bookmarklet that everyone can install in their bookmarks toolbar. One click, and bam, the quizzes disappear. Well almost all of them anyway.

How-To – Kuneri’s Version

Kuneri wrote a filter that is more comprehensive that it deletes all “news” from external apps (so he claims), which is a good idea because Facebook apps are 99.9% shit anyway. It also catches new items and filters them straight away.

I’ve expanded on his work and made different options, e.g. one that just fades the spam and makes it readable when you click on it, and another one that makes it faded and not take up that much space.

Total Deletion
javascript:void(( function () { document.addEventListener("DOMNodeInserted",function(event) {if(location.href.match('\/home\.php') && event.target.getElementsByClassName && event.target.getElementsByClassName('UIIntentionalStory_AttachmentInfo')) cleartheshizzle(event.target);}, false ); var cleartheshizzle=function(storyNode) {var footernodes = storyNode.getElementsByClassName('UIStoryAttachment');for (var i = 0; i < footernodes.length; i++) {if (footernodes[i].innerHTML.match('apps\.facebook\.com\/')) {storyNode.style.display='none';}};footernodes=null; }; if(location.href.match('\/home\.php')) {var storyNodes = document.getElementsByClassName('UIIntentionalStory');for (var i = 0; i < storyNodes.length; i++) {cleartheshizzle(storyNodes[i]);} }})());

Faded and Shrunk, Click to View
javascript:void(( function () { document.addEventListener("DOMNodeInserted",function(event) {if(location.href.match('\/home\.php') && event.target.getElementsByClassName && event.target.getElementsByClassName('UIIntentionalStory_AttachmentInfo')) cleartheshizzle(event.target);}, false ); var cleartheshizzle=function(storyNode) {var footernodes = storyNode.getElementsByClassName('UIStoryAttachment');for (var i = 0; i < footernodes.length; i++) {if (footernodes[i].innerHTML.match('apps\.facebook\.com\/')) {var tgt = storyNode;tgt.onclick = function() {this.style.height = (this.style.height == '20px')?'auto':'20px';this.style.opacity = (this.style.opacity < 1)?1:0.2;};tgt.style.height = '20px';tgt.style.opacity = 0.2;tgt.style.overflow = 'hidden';}};footernodes=null; }; if(location.href.match('\/home\.php')) {var storyNodes = document.getElementsByClassName('UIIntentionalStory');for (var i = 0; i < storyNodes.length; i++) {cleartheshizzle(storyNodes[i]);} }})());

Here’s a preview of what it does, with pixelation to protect the innocent and the stupid:
Fade and Shrink

How To
  1. Copy one of the codes in the gray boxes above (you can triple-click to select the whole thing) into your clipboard.
  2. Go to your Bookmarks toolbar (in Firefox, this is the bar where the “Smart Bookmarks” appears), right click in an empty area, and select “New Bookmark…”
  3. Add Bookmark
    Paste the copied code into the “Location:”
  4. Give the bookmark a name. I label mine “Fuck Quizzes”, and click “Add”.
  5. To test, go to your Facebook news feed, click the bookmark, and see the quizzes (if there were any) disappear.
  6. Profit!

Old and Doesn’t Always Work – pepcza Version

pepcza’s version of the script tries to find the words “took the” and “quiz”, but I think the quizmakers are changing it to “completed the quiz”, so it doesn’t always work.
(Tried on Firefox and Opera. If you use IE, my condolonces.)

  1. Copy the following code (you can triple-click to select the whole thing) into your clipboard:
    javascript:void((function(){var filterString = []; var h = 0; filterString[h++] = "//h3[@class = 'UIIntentionalStory_Message' and ((contains(string(.), 'took the') and contains(string(.), 'quiz')) or contains(string(.), 'Check out this quiz!'))]/ancestor::div[contains(@class, 'UIStory')][1]"; filterString[h++] = "//div[@class = 'UIStoryAttachment_Copy' and ((contains(string(.), 'took') and contains(string(.), 'quiz')) or contains(string(.), 'Check out this quiz!'))]/ancestor::div[contains(@class, 'UIStory')]"; for (var h = 0; h < filterString.length; h++) { var quizStories = document.evaluate(filterString[h], document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0; i < quizStories.snapshotLength; i++) { quizStories.snapshotItem(i).style.display = 'none';}}})());
  2. Continue with Step 2 above!

Thoughts

I wonder if there’s a way to “OR” XPath statements, there probably is, I’m just too lazy to read up on it. And I wonder if this will just make the problem worse, because people who remove the damned quiz-spam will not complain about it, and the original problem won’t get fixed.

Oh No, A Diary!

Anyway, I happened upon avoision.com through BoingBoing, and wasted a few hours reading through the entries. Heh, blogs that go back years and years and have a lot of entries are always fun like that. It also reminded me of my own attempts of blogging, and then returning to the entries years later to think, “Wow, I’ve forgotten about that!”

So then I thought, “I should start (re-)doing that, blogging my daily life.”. Then I thought, “But all I do is sit around and watch my life tick away.” (not really, but that’s the “executive summary”).

Anyway, today I’ve been hacking a PHP script… hey, where did everyone go? … that creates HTTP Post requests, especially multi-part requests. The post body is made as a MIME stream, with a separator string that is unique and doesn’t occur in the contents. So I created said MIME stream, sent it to the server, and the server doesn’t see it properly. After a few hours of debugging, I saw the problem.

If the boundary (i.e. separator) is “abcd”, the first part is indicated with "--abcd", the last part is terminated with "--abcd--". Unfortunately the boundary Firefox generates is usually something like "------------1231231312". So two more -’s in front of that wasn’t really noticable.

Aarrgghhh!!!!

Oh well, that’s the problem with not reading the specs… you FAIL.

George W. Bush’s Farewell Speech: Good Riddance

Thank you. Fellow citizens, for eight years, it has been my honor to serve as your president.

as I’m sure it has been a nightmare for you to be served by me.

The first decade of this new century has been a period of consequence, a time set apart.

Tonight, with a thankful heart, I have asked for a final opportunity to share some thoughts on the journey we have traveled together and the future of our nation.

Five days from now, the world will witness the vitality of American democracy. In a tradition dating back to our founding, the presidency will pass to a successor chosen by you, the American people.

… which is a break from the way I got into power.

Standing on the steps of the Capitol will be a man whose history reflects the enduring promise of our land.

This is a moment of hope and pride for our whole nation. And I join all Americans in offering best wishes to President-elect Obama, his wife, Michelle, and their two beautiful girls.

They’ll need it.

Tonight, I am filled with gratitude to Vice President Cheney and members of the administration; to Laura, who brought joy to this house and love to my life; to our wonderful daughters, Barbara and Jenna; to my parents, whose examples have provided strength for a lifetime.

And above all, I thank the American people for the trust you have given me. I thank you for the prayers that have lifted my spirits. And I thank you for the countless acts of courage, generosity and grace that I have witnessed these past eight years.

This evening, my thoughts return to the first night I addressed you from this house, September 11, 2001. That morning, terrorists took nearly 3,000 lives in the worst attack on America since Pearl Harbor.

I remember standing in the rubble of the World Trade Center three days later, surrounded by rescuers who had been working around the clock. I remember talking to brave souls who charged through smoke- filled corridors at the Pentagon and to husbands and wives whose loved ones became heroes aboard Flight 93.

I remember Arlene Howard, who gave me her fallen son’s police shield as a reminder of all that was lost. And I still carry his badge.

As the years passed, most Americans were able to return to life much as it had been before 9/11. But I never did. Every morning, I received a briefing on the threats to our nation. And I vowed to do everything in my power to keep us safe.

Unlike before that day, where every morning, I received a briefing on the threats to our nation, and ignored them.

Over the past seven years, a new Department of Homeland Security has been created. The military, the intelligence community and the FBI have been transformed. Our nation is equipped with new tools to monitor the terrorists’ movements, freeze their finances, and break up their plots.

And to bully and terrorize passengers – from the very young to the very old – everytime they want to fly anywhere.

And with strong allies at our side, we have taken the fight to the terrorists and those who support them. Afghanistan has gone from a nation where the Taliban harbored al Qaeda and stoned women in the streets to a young democracy that is fighting terror and encouraging girls to go to school.

When I say fighting terror, I don’t mean winning against them.

Iraq has gone from a brutal dictatorship and a sworn enemy of America to an Arab democracy at the heart of the Middle East and a friend of the United States.

And a great source of oil. Yes, anybody with a gun pointed to their head would tell you they’re your friend.

There is legitimate debate about many of these decisions, but there can be little debate about the results. America has gone more than seven years without another terrorist attack on our soil.

Just like it was safe for eight years between 1993 and 2001. I also have this rock that has kept tigers away. How does it work? Well, do you see any tigers?

This is a tribute to those who toil day and night to keep us safe — law enforcement officers, intelligence analysts, homeland security and diplomatic personnel, and the men and women of the United States armed forces.

Our nation is blessed to have citizens who volunteer to defend us in this time of danger. I have cherished meeting these selfless patriots and their families. And America owes you a debt of gratitude.

And to all our men and women in uniform listening tonight, there has been no higher honor than serving as your commander in chief.

The battles waged by our troops are part of a broader struggle between two dramatically different systems. Under one, a small band of fanatics demands total obedience to an oppressive ideology, condemns women to subservience, and marks unbelievers for murder.

The other system is based on the conviction that freedom is the universal gift of Almighty God and that liberty and justice light the path to peace.

This is the belief that gave birth to our nation. And in the long run, advancing this belief is the only practical way to protect our citizens.

That’s why I’ve been spreading this belief with bullets and carpet bombs.

When people live in freedom, they do not willingly choose leaders who pursue campaigns of terror.

They get brainwashed to do it by Turd Blossom, like 4 years ago!

When people have hope in the future, they will not cede their lives to violence and extremism.

So I wonder why I am doing shit nothing at all while Israel destroys all hope for Palestinians.

So around the world, America is promoting human liberty, human rights and human dignity. We are standing with dissidents and young democracies, providing AIDS medicine to bring dying patients back to life, and sparing mothers and babies from malaria. And this great republic, born alone in liberty, is leading the world toward a new age when freedom belongs to all nations.

For eight years, we have also strived to expand opportunity and hope here at home. Across our country, students are rising to meet higher standards in public schools. A new Medicare prescription drug benefit is bringing peace of mind to seniors and the disabled. Every taxpayer pays lower income taxes.

And got what they paid for from the Government. You expect bridges that don’t collapse, smooth roads, rescue from hurricanes? Hey you paid us peanuts! And we’re really monkeys.

The addicted and suffering are finding new hope through faith-based programs. Vulnerable human life is better protected. Funding for our veterans has nearly doubled.

… despite the fact we’ve got who knows how many more veterans. And please forget Walter Reed.

America’s air, water and lands are measurably cleaner.

Please don’t fact-check this sentence, I got a buddy of mine to run the EPA. Just like I appointed unqualified friends and like-minded religious Zealots to every position I could. Oh hey John Bolton!

And the federal bench includes wise new members, like Justice Sam Alito and Chief Justice John Roberts.

Which are other examples of religious Zealots. Too bad Harriet Miers isn’t with them, I was sure she’d get in.

When challenges to our prosperity emerged, we rose to meet them. Facing the prospect of a financial collapse, we took decisive measures to safeguard our economy. These are very tough times for hardworking families, but the toll would be far worse if we had not acted.

I will not say “the seeds of this collapse was planted before I came to power, like I have before, because if I said that, that means I’ve spent 8 years without even trying to fix the problem. But that doesn’t mean I did spend 8 years trying to prevent the problem!

All Americans are in this together. And together, with determination and hard work, we will restore our economy to the path of growth. We will show the world once again the resilience of America’s free enterprise system.

Down with socialism!

Like all who have held this office before me, I have experienced setbacks and there are things I would do differently, if given the chance.

Although, if you were given the chance to do things differently, it would be Al Gore standing here.

Yet, I’ve always acted with the best interests of our country in mind. I have followed my conscience and done what I thought was right. You may not agree with some tough decisions I have made, but I hope you can agree that I was willing to make the tough decisions.

The problem was just that with a brain of a fifth grader, I really can’t get very far…

The decades ahead will bring more hard choices for our country, and there are some guiding principles that should shape our course.

While our nation is safer than it was seven years ago, the gravest threat to our people remains another terrorist attack. Our enemies are patient and determined to strike again.

And no, the gravest threat to our people is not the erosion of civil liberties, in the form of eavesdropping, renditions, etc, etc.

America did nothing to seek or deserve this conflict.

Although very intelligent people like Noam Chomsky might disagree.

But we have been given solemn responsibilities, and we must meet them. We must resist complacency. We must keep our resolve. And we must never let down our guard.

Like my administration before that fateful day. Skipping the meetings that Clinton’s security advisor set-up was a bad idea.

At the same time, we just continue to engage the world with confidence and clear purpose. In the face of threats from abroad, it can be tempting to seek comfort by turning inward. But we must reject isolationism and its companion, protectionism.

Retreating behind our borders would only invite danger. In the 21st century, security and prosperity at home depend on the expansion of liberty abroad. If America does not lead the cause of freedom, that cause will not be led.

As we address these challenges, and others we cannot foresee tonight, America must maintain our moral clarity.

I have often spoken to you about good and evil, and this has made some uncomfortable. But good and evil are present in this world and between the two, there can be no compromise. Murdering the innocent to advance an ideology is wrong every time, everywhere.

Whereas torturing them is a-okay, in my book.

Freeing people from oppression and despair is eternally right. This nation must continue to speak out for justice and truth. We must always be willing to act in their defense and to advance the cause of peace.

President Thomas Jefferson once wrote, “I like the dreams of the future better than the history of the past.” As I leave the house he occupied two centuries ago, I share that optimism.

I’m sure you do too, especially because I am leaving.

America is a young country, full of vitality, constantly growing and renewing itself. And even in the toughest times, we lift our eyes to the broad horizon ahead.

I have confidence in the promise of America because I know the character of our people. This is a nation that inspires immigrants to risk everything for the dream of freedom.

This is a nation where citizens show calm in times of danger and compassion in the face of suffering. We see examples of America’s character all around us, and Laura and I have invited some of them to join us in the White House this evening.

We see America’s character in Dr. Tony Recasner, a principal who opened a new charter school from the ruins of Hurricane Katrina. We see it in Julio Medina, a former inmate who leads a faith-based program to help prisoners returning to society. We see it in Staff Sgt. Aubrey McDade, who charged into an ambush in Iraq and rescued three of his fellow Marines.

We see America’s character in Bill Krissoff, a surgeon from California. His son Nathan, a Marine, gave his life in Iraq. When I met Dr. Krissoff and his family, he delivered some surprising news. He told me he wanted to join the Navy Medical Corps in honor of his son.

This good man was 60 years old, 18 years above the age limit. But his petition for a waiver was granted, and for the past year he has trained in battlefield medicine.

Lt. Cmdr. Krissoff could not be here tonight, because he will soon deploy to Iraq, where he will help save America’s wounded warriors and uphold the legacy of his fallen son.

He’s lucky he’s not going on Rumsfeld’s watch, because it would have been to join his fallen son.

In citizens like these we see the best of our country, resilient and hopeful, caring and strong. These virtues give me an unshakable faith in America. We have faced danger and trial, and there is more ahead.

But in a few days there will be one less danger.

But with the courage of our people and confidence in our ideals, this great nation will never tire, never falter and never fail.

Despite the utter incompetence of the men who get to be in charge of it once in a while. Men like me and my Administration.

It has been the privilege of a lifetime to serve as your president. There have been good days and tough days. But every day, I have been inspired by the greatness of our country and uplifted by the goodness of our people.

I have been blessed to represent this nation we love. And I will always be honored to carry a title that means more to me than any Other — citizen of the United States of America.

I hope you don’t strip that citizenship off me, because heck, I think I deserve that punishment.

And so, my fellow Americans, for the final time, good night. May God bless this house and our next president. And may God bless you and our wonderful country.

And may God forgive me for having ruined it so severely.

Bookmarklet to Rotate Facebook Images On Viewing

Yet another development post…

So I made a JavaScript “tool” to rotate Facebook images on viewing; i.e. if the uploader forgot to do it you can rotate it for your viewing – it doesn’t change anything on the server, only on your browser.

Read more about it…

Actually it can be made to rotate any image on any website… but I guess I’ll start small. And actually I’ve had that code for 8 months, and haven’t done anything else with it.

iPhone-Dev: Creating a Full-Screen Camera Preview, Part 2.

Damn, this blog is all about development nowadays, and to think, I told one guy I didn’t want to put his blog on my blogroll because it mostly had development stuff. Actually all it had was his “portfolio” of websites/apps he made, not bad, but not really a blog. So I said no. So he got offended. Eh, bite me, you SEO-weenie.

Well to get back to the point, like Erica, I hate the fact that the user has to click touch “Take Photo” to take a picture. I looked ather instructions, and after some a lot of struggling managed to get it to work.

But a problem was, the camera overlay would return if one returns to the camera view after leaving it, so I realized it had to go into its own view controller.

I tried improving it today, and it was really simple!

In the .h file:

@interface MyImagePickerController : UIImagePickerController {
  // Empty
}
@end

And in the .m file:

@implementation MyImagePickerController
- (void) viewDidAppear: (BOOL)animated {
  [super viewDidAppear:animated];
  UIView *plCameraView = [[[[[[self.view subviews] objectAtIndex:0] subviews] objectAtIndex:0] subviews] objectAtIndex:0];
  // [[[plCameraView subviews] objectAtIndex:3] removeFromSuperview];
  [[[plCameraView subviews] objectAtIndex:3] setHidden:YES];
}

Initializing is just like before:

  MyImagePickerController *imagePickerController = [[MyImagePickerController alloc] init];
  imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;

And to capture the preview, e.g. with an NSTimer (I haven’t looked up how to fake the clicking of the “Take Photo” button):

  CGImageRef img = UIGetScreenImage();
  UIImage *grabbedImage = [UIImage imageWithCGImage:img];
  // you can now manipulate the grabbedImage;
  CFRelease(img);

Update 2009-01-17: for some reason the overlay reappears when the view is redrawn, and it doesn’t seem that viewDidAppear gets recalled. Peeking at lajos’ code, he uses the method setHidden:YES, and it works for what I did too. So I’ve “commented out” my previous code that deletes the overlay and replaced it with one that just makes the overlay – as the method tells you – hidden.

Man of the Year…

For the fucking win…

So sad that he missed… so sad.

(via The Guardian).

Journalism Schmournalism…

Anyway, yesterday I went to the movies and watched Quantum of Solace. What an excellent movie, I enjoyed how suave James Bond was in the face of grave danger; jumping out of a plane without a parachute, being sure that he can grab and hold on to his girl – who does have a parachute – and piggyback on her to land safely. Or jumping to some thin railing, hiding himself behind a wall and walking effortlessly on said railing as his MI-6 colleagues storm the hotel looking for him. Facing death in a car, on boat, in flight, on foot were no problems for him.

I returned home, went online, and found myself in a world which made me feel like I was still in a James Bond movie: terrorists attacking 10 locations in Mumbai, taking hostages in 2 hotels and setting fire to them (the hotels that is, and not the hostages (well hopefully not)).

So I turned on the TV and started watching the news channels, and looked online to find the most up-to-date information.

After a while, I started to notice something: repetition. The news people kept repeating the same news, even if it is a few hours old. The same video of that damned SUV which the terrorists hijacked, whizzing by! And through it all, the banner “Live!”.

God damn it, it annoyed me. I learnt somewhere that they can claim it’s “Live!” even though they’re showing recycled video, as long as the talking head is still there, talking. All he/she might be saying is “Let’s look at this video now.”, and then show a video which is 2 hours old, but it’s still “live” – and the “Live!” banner can stay on – because that moron is still sitting in Atlanta talking to you with a maximum of maybe 10 seconds satellite, etc, delay.

Online sources aren’t any good either. One-lined headlines on news sites are better than nothing, but please put a timestamp on it could you? NYTimes, BBC, CNN sites got in on the “action”, doing “live-blogging”, though mostly with 1 hour or so since the last update.

I can understand it, in a siege situation you’re mostly sitting there wondering what the hell is going on. Maybe the military is gathering information or planning their attack, and it takes time, and they’re surely not going to share information which the TV-folks could then relay back to the terrorists. So what do the TV-folks do? They keep talking… showing the same bits of what they have over and over again.

Then online, some claim, it’s “citizen journalism” to the rescue! Twitter and Flickr for the win! So far I’ve only seen one good Flickr stream which contained original content, so good that CNN and Yahoo! copied it and gave that Flickr’er (huh?) his Warholian 15 minutes. The rest? Oh, screencaps of what they saw on CNN. Yeah, great, citizen journalism? It’s just rehashing the news that you got from TV/the web! The same with Twitter, it’s all people sitting on their asses in front of their computers, rehashing what they read on a news site or saw on TV.

If you were really on the ground and watching the events live, would you really be twittering? Instead it’s people watching the TV and talking about what they saw on TV. How is that journalism?

So dare I say it, citizen journalism is a crock of crap. OK not all of it, but can you really expect to get credit when all you’re doing is sitting on your ass watching the TV and tweeting about it? Meanwhile, it’s getting praise for the great work it’s doing, from, well, itself, and, from the “real”, a.k.a. “traditional” journalists. “Look, it’s a tweet about some guy worrying about his family member.”. My opinion: How the f*** is that news-relevant!?!? Is that really news? Of course there will be people worried about their family members. Why the f is the fact that it’s being put on public display on the web’s latest hyped website, news-relevant?

The best journalism still comes from those who are paid and trained to do it, unfortunately as I’ve already said, they are failing at the business of providing accurate and timely information.

“Oh, that hotel has been cleared.”. “Oh, still shooting at that hotel.” Which info came first? Was there shooting and then the clearance, or the other way around, disqualifying the “all clear.”? The fact that the TV just loops the tapes and talk over and over again doesn’t help either. “Still shots at this location.” Oh yeah, how current is this information?”. Lack of timestamps is one problem, inaccurate information another.

I suppose I am expecting too much of the fictional world in this real-life scenario. In a movie you’d have an expert team which has 3D maps of the scene, events and where the bad guys are. (Yeah, very unrealistic, that’s why it only happens in movies.) As an aside, the Dark Knight’s kick-ass sonar system comes into mind as realistic enough; it would be cool to have something like that.

But lacking all that, I wish the journalists can timestamp all the information they are spewing, I know repeats are necessary, but give me a way to know how new your so-called “news” is!

And where’s James Bond, or John McClane?

error: invalid suffix “f” on integer constant

Apparently the way to fix this is to convert the integer to a float; from e.g. “45f” to “45.0f”.

At least it compiles after that!

Losing My Virginity

I bet that title got your attention, eh?

So for whatever reason I decided the other day to get 2 books by Richard Branson, his auto-biography Losing My Virginity: How I’ve Survived, Had Fun, and Made a Fortune Doing Business My Way, and the summary of it, Screw It, Let’s Do It (it basically compressed the story of the first book into 106 pages of large type, readable in 2 hours and spoiling the thicker book).

Laying in bed trying to fall asleep after reading a quarter of the real book, I thought, “Man, this guy was sure great, but I think he could have done it better – if he had known what he was doing, he’d be number one e.g. in the airline business, instead of playing second fiddle to British Airways [I don't know if that's the real case, in my mind anyway the BA brand is more prestigious]. He failed a lot too during his record company years, struggling to stay in business, signing bad bands and missing to sign the ones that would be successful.” Then I had to laugh at my thoughts. This guy is about to be the first guy to launch a space-tourism business with Virgin Galactic (which, BTW, is the most freaking awesome name IMO) in 2 years, he owns his own private island and he was already running several record stores and a recording studio at age 20, how can I be calling him a failure?

I suppose that’s when I realized how true that old wisdom is, to succeed, you have to fail a lot, and only when you keep on going and keep on trying will you be successful.

My FUBARed Windows

So anyway, despite being a Linux fan, I still use Windows 2000 and XP on my desktop and laptop computers respectively. Maybe it’s because Linux’ Suspend-to-RAM doesn’t work on my desktop, and STR is a great feature: 5, maybe 10 seconds to return to the desktop you left a few days ago.

But as it is Windows, sometimes you need to reboot. The last few months (has it been a year already?), my Windows 2000 has failed to boot properly, with consistency. It blue-screens after the splash screen with IRQL_NOT_LESS_OR_EQUAL, saying ntoskrnl.exe did it. Not even safe-mode saves me from it.

The fix was hard to find, but easy to apply. Restore the WINNT\Config\SYSTEM from the backup, a file called SYSTEM.ALT. This can be best done on my xubuntu installation.

After wondering how the the 2 files differ, I did a diff, and figured out it’s mostly in the first 10 bytes. The SYSTEM file begins with regf (to signify that it’s a registry hive?), 2 bytes, 2 null bytes, and a repeat of the first 2 bytes after regf. The difference usually is those 2 non-null bytes. Replacing SYSTEM with SYSTEM.ALT – which has different magic bytes – almost always saves the Windows installation.

So my question is, what the hell is Windows doing? Why does it write bad bytes into the SYSTEM hive file, that makes it fail to boot. Or is it doing that on boot? WTF is wrong with you, Windows?

Our New Engine is Called “Engine”!

So here’s the story of the confusing (if you looked into it deeper) naming of Intel’s CPUs.

It began with their mobile CPU, a 32-bit next generation of the Pentium M. They probably asked marketing what name would be cool. And the geniuses came up with “Intel Core“.

Then Intel developed a new micro-architecture, which is new, and cool, and 64-bit. What did they decide to name it? “Intel Core”. D’oh! OK, to avoid confusion you should call it “Intel Core Microarchitecture“.

Then they wanted to sell CPUs with this new architecture. So they probably asked marketing again for an appropriate brand for CPUs equipped with it. “How about, ‘Intel Core 2‘?”…

So now you have Intel Core (CPUs), which doesn’t have Core (the micro-arch), and Intel Core 2, which does have Core (the micro-arch). And because two is better than one, they sell Core Duo, which just means 2 cores of Core, and a word “Duo” which means 2 in Latin. Yeehaw! There’s also Core 2 Duo, a chip with 2 cores of Core 2.

Simple, right?

Removing High-Pitched Noise from Canon Powershot Videos

One for the Googlers:

My Canon Powershot A630 also records videos. Unfortunately the microphone catches the sound of the internal mechanism (I think it’s the screen) and the video it produces has an annoying ringing noise.

Using this tip on audio removal from the wiki for the software Audacity, I managed to figure out that the high-pitched noise has a frequency of 4290 Hz.

I extracted the audio from the video using VirtualDub, and opened it with Audacity 1.3.4 beta. Like the Wiki page instructed, I used the Nyquist prompt and the command (notch2 s 4290 50) (yes the brackets are necessary), and this removed the noise flawlessly!

All that needs to be done is now to reinsert the audio into the video file. I can combine this with re-encoding the video with a more size- (and web-) friendly codec.

My First Word Processor

Talking about dot-matrix printers, a childhood memory of war (against the computer) comes back to me…

The year was when I was going to 7th grade (I’m 27 now, so calculate it yourself). A teacher wanted an assignment to be handed in computer-typed. No problem, I thought, I have WordStar and a printer.

At home, I booted up my DOS PC, put in the WordStar disk (5.25 inch!), and typed “ws.exe”. Bzzt, bzzt, I was back in DOS. Damnit, the program was infected with a virus!

With the assignment due the next day, I was desperate.

“I know, I’ll use Quick Basic’s features to control the printer, and make it print what I want”. All my program did: wait for input, and print it out. But the variable to hold the input can have a maximum of 255 characters!

“No problem, I’ll just stop after typing 3 full lines with 80 characters each, and press Enter. Put the whole thing in a while loop.”.

So that’s what I did, the printer screeching every time I hit Enter. One time I hit Enter too soon, leaving, aieieie, a big nasty gap in the middle of the page, catastrophe! (Was it in the middle of a word too? Can’t recall).

I was quite proud handing in that piece of paper with unformatted lines filling it. I tried to explain to my physics teacher why there was a gap in the middle, but looking back at it, I don’t think he cared…

F***ing Faceboof!

On my second rant against the most idiotic thing ever invented, Faceboof apps, I shall now rant against the Super Wall…

What is it? Just the “web 2.0″ (or is it just Facebook) equivalent of email chain-letters. It was born to this feature with the fact that you can write, and forward a message, to, per default, ALL of your contacts. What’s in it? The same bullshit, over and over again, forwarded to you by your “friends” because it says “Forward now!”. Somebody should really invent a one-button “Send me money” functionality on the web, imagine how rich he’ll be after posting “Click here now!”.

So anyway, there’s this joke posted on some person’s super wall I wanted to read. It turned out to be a rehash of the old joke of reasons why a computer is male (you got it to solve problems, instead it IS the problem), and reasons why it should be female (only its creator understand its internal logic). Anyway, before I found this out, I had to click “Click here to read the rest of this message” (Haha, I’m just as stupid… Ka-ching!). So I did. “Install Super Wall?”, the stupid thing asked. “Well all right, I’ll delete it afterwards.”. Uncheck all the stupid things it wants to do like write to my status feed, spam my mailbox, put itself on my profile (oh hell no!), and click “Install!”…

“Do you want to invite your friends?” No, f- you, skip that.
“Do you want to send e-cards?” No…
“Do you want [I forget what, I was just looking for the skip message]“.

Ah the stupidity of Facebook apps. If you want to interact with a friend’s installed app, you have to install it too! Because user-base is everything! “We have a million users! Now give us 50 million f’ing dollars you stupid venture capitalists!”

OK, can I now downgrade to Web 1.0 please? Here’s your quote of the day: “Web 2.0 is Windows Vista”.

Faceboof

Wow, Facebook has a pretty cool new feature, “People you may now”, probably those people who have a high number of mutual friends with me, a.k.a. “2nd-degree friends” or nodes on the network with distance = 2 via multiple paths.

Out of the three people it recommended for me, it got 2 wrong, and 1 right, I do know her, but eh, I don’t really want to be “friends” with her, because I think she’s a b***h…

My Take on The Absolut World

Funny to see that most of the photoshops have been from the “America is great, get a brain you morans!” side of the blogosphere. I suppose the don’t-have-a-brain-big-enough-for-a-sense-of-humour conservatives are the ones being offended by Absolut’s humourous ad.

And apparently the war’s even reached Wikipedia’s talk page on Absolut Vodka, with these dolts being outraged that Wikipedia is, I would convey it as “taking Absolut’s side” on this “controversy.”. Talk about sounding like 5 year old kids. One commenter even wrote that they are outraged that a company redrew the border of a sovereign nation. Oh boo-hoo mate, it’s a joke! So what if some ad-executive (or whoever) wants to draw the borders in any way he or she pleases? It’s called free speech and even if the conservative dolts can’t accept it (like a lot of things in the world that they can’t accept), it’s still the law!

Next Vacation Destination

Pictures in Google Maps

Wow, so Google Maps now has geo-tagged pictures from Panoramio. At least my account has it, I think it’s a limited beta which I got a lottery for.

Panoramio

I must admit, it’s pretty cool, to see pictures of Monaco, you just browse to Monaco. How intuitive!

The first time I visited Panoramio, I wasn’t really impressed with it: it had the Google Maps Javascript application embedded in every page, which slowness-effect just annoys you on a Gigahertz computer. And every time you click an image you navigate away from the current page, loading another page, with another JS-bloat, argh! [And here I am with a cool answer to this problem, but I'm just sitting on it!]

But then, even something as simple as that can be bought by Google. Geez, I wish I had thunk of that! :)

Next Page »


 

December 2009
M T W T F S S
« May    
 123456
78910111213
14151617181920
21222324252627
28293031  

a

Reverse

To reverse the order of the entries (chronogical top-to-bottom), paste this into your address bar, and hit Enter: