— Tech+Life+Music

Archive
Archive

The While True blog recently posted an interesting article: What if Visual Studio had Achievements?, a fantastic play on the achievement system that quite a number of modern video games implement.

For the unfamiliar, achievements in video games are normally awarded to players after specific in-game milestones (like the Trusty Hardware achievement in Half-Life 2, awarded after the protagonist acquires the crowbar melee weapon), or for accomplishing something worthy of note (like the Zerglot achievement in Starcraft 2: Wings of Liberty, awarded after a Zerg player succeeds in warping in a Zealot — normally a Protoss unit — during a standard online league game).

Having a ready list of “Visual Studio achievements”, I just had to scan it and pick out the achievements that I would have earned during my professional career as a programmer. So, here they are:

  • Job Security – written a LINQ query with at least 30 lines of code.
  • The Sword Fighter – five consecutive solution rebuilds without a single code change. (I must admit, sometimes I’m just paranoid.)
  • The Mathematician – defined five local variables with a single character name. (Normally when I want to obfuscate my code, especially in Javascript.)
  • Spaghetti Monster – written a single line of code with over 300 characters. (I’m not proud of this, but yeah, now I break on commas when I can, and chain dot-notation when possible.)
  • The Portal – created a circular project dependency.
  • The Multitasker – have at least 50 source files open at any one time.
  • Highway to Hell – successfully created a WCF service.
  • The Explainer – written a comment with more than 100 words.
  • Rage Quit – pressed ALT-F4 after a failed bug fix.
  • The Architect - created 25 interfaces in a single project. (I normally did this in the past on my data layers — my interfaces were normally entity behaviors, like IsSoftDeletable or IsArchiveable.)
  • The Right Way – created a (unit) test method that is longer than the actual method being tested.
  • The Defender – checked every argument for null exceptions. (Had to do this once, passing in arguments into an Oracle stored procedure.)
  • Warm Bath – successfully consumed a non-.NET web service.
  • The Cloner – copy-pasted at least 50 lines of code. (Doesn’t matter from where to where, right?)
  • Paying the Bills – imported a Visual Basic project.
  • First Hit – imported a CodeProject.com library into your project, and it actually compiled.

Looking back, most of those achievements strongly highlighted bad coding practice. I’d like to think that I’m a waaaaaaaaaaay better coder now than, what, four or five years ago.

And as a parting note, I really should obtain this achievement:

  • Steam Powered – added Visual Studio as a Steam game.

HELL YEAH.

Read More

Text below taken from Chloe Dumbrigue, who got it off Bittersweet by Shauna Niequist in Relevant Magazine.

Here are the things really worth caring about in your 20′s.

When you’re 25-ish, you’re old enough to know what kind of music you love, regardless of what your last boyfriend or roommate always used to play. You know how to walk in heels, how to tie a necktie, how to give a good toast at a wedding and how to make something for dinner. You don’t have to think much about skin care, home ownership or your retirement plan. Your life can look a lot of different ways when you’re 25: single, dating, engaged, married. You are working in dream jobs, pay-the-bills jobs and downright horrible jobs. You are young enough to believe that anything is possible, and you are old enough to make that belief a reality.

Job

Now is the time to figure out what kind of work you love to do. What are you good at? What makes you feel alive? What do you dream about? You can go back to school now, switch directions entirely. You can work for almost nothing, or live in another country, or volunteer long hours for something that moves you. There will be a time when finances and schedules make this a little trickier, so do it now. Try it, apply for it, get up and do it.

When I was 25, I was in my third job in as many years—all in the same area at a church, but the responsibilities were different each time. I was frustrated at the end of the third year because I didn’t know exactly what I wanted to do next. I didn’t feel like I’d found my place yet. I met with my boss, who was in his 50s. I told him how anxious I was about finding the one perfect job for me, and quick. He asked me how old I was, and when I told him I was 25, he told me that I couldn’t complain to him about finding the right job until I was 32. In his opinion, it takes about 10 years after college to find the right fit, and anyone who finds it earlier than that is just plain lucky. So use every bit of your 10 years: try things, take classes, start over.

Relationships

Now is also the time to get serious about relationships. And “serious” might mean walking away from the ones that don’t give you everything you need. Some of the most life-shaping decisions you make in this season will be about walking away from good-enough, in search of can’t-live-without. One of the only truly devastating mistakes you can make in this season is staying with the wrong person even though you know he or she is the wrong person. It’s not fair to that person, and it’s not fair to you.

Counseling

Twenty-five is also a great time to start counseling, if you haven’t already, and it might be a good round two of counseling if it’s been a while. You might have just enough space from your parents to start digging around your childhood a little bit. Unravel the knots that keep you from living a healthy whole life, and do it now, before any more time passes.

Church

Twenty-five is the perfect time to get involved in a church you love, no matter how different it is from the one you were a part of growing up. Be patient and prayerful, and decide that you’re going to be a person who grows, who seeks your own faith, who lives with intention. Set your alarm on Sunday mornings, no matter how late you were out on Saturday night. It will be dreadful at first, and then after a few weeks, you’ll find that you like it, that the pattern of it fills up something inside you.

Don’t get stuck

This is the thing: when you start to hit 28 or 30, everything starts to divide, and you can see very clearly two kinds of people: on one side, people who have used their 20s to learn and grow, to find God and themselves and their deep dreams, people who know what works and what doesn’t, who have pushed through to become real live adults. And then there’s the other kind, who are hanging onto college, or high school even, with all their might. They’ve stayed in jobs they hate, because they’re too scared to get another one. They’ve stayed with men or women who are good but not great, because they don’t want to be lonely. They mean to find a church, they mean to develop honest, intimate friendships, they mean to stop drinking like life is one big frat party. But they don’t do those things, so they live in kind of an extended adolescence, no closer to adulthood than they were when they graduated college.

Don’t be like that. Don’t get stuck. Move, travel, take a class, take a risk. Walk away, try something new. There is a season for wildness and a season for settledness, and this is neither. This season is about becoming. Don’t lose yourself at happy hour, but don’t lose yourself on the corporate ladder either. Stop every once in a while and go out to coffee or climb in bed with your journal. Ask yourself some good questions like: “Am I proud of the life I’m living? What have I tried this month? What have I learned about God this year? What parts of my childhood faith am I leaving behind, and what parts am I choosing to keep with me for this leg of the journey? Do the people I’m spending time with give me life, or make me feel small? Is there any brokenness in my life that’s keeping me from moving forward?”

Now is your time. Become, believe, try. Walk closely with people you love, and with other people who believe that God is very good and life is a grand adventure. Don’t spend time with people who make you feel like less than you are. Don’t get stuck in the past, and don’t try to fast-forward yourself into a future you haven’t yet earned. Give today all the love and intensity and courage you can, and keep traveling honestly along life’s path.

Read More

It’s been a wild ride, definitely. And here I am, speaking as if the year ends tonight.

Of all the holidays in the year, I think that everyone has the definite right to be happy and smile during their birthdays, Valentines’ and Christmas (the New Year is a definite contender too). So to everyone out there reading this, make sure that you spend your holidays with your loved ones, and the people that make you happy. I really wish that you’re in good health.

If you’re not reading this, well, you should be! :p

Happy holidays to you and your family!

Read More

I really found myself with a lot of time during the holiday vacation, so I decided to take up some of the stuff that I really want to get done with our news site, The News Chronicle, and some of my side projects.

Since yesternight, I was working on a new feature for The News Chronicle that I call “VISTA” – it’s works like a glorified photo slideshow. What it basically does is, readers in the site can click a link on the article (if it’s available) and a small window with all the article’s photographs show up. This way, there’s great access to these photographs, readers can have a better service experience, and, I must admit, it does open up some great new possible ventures for the site.

Problems with FancyBox 1.2.6 in Internet Explorer 7

Readers can sometimes see this link in articles, which they can click to launch Vista.

 

Problems with FancyBox 1.2.6 in Internet Explorer 7

And this is a pretty early beta version of the Vista service interface, as seen using Google Chrome 4.0.249.43

 

I’m using the FancyBox 1.2.6 extension for jQuery 1.3.2, and testing had been going smoothly so far. As you can see, the Chrome version of the interface is pretty solid. Vista was also performing seamlessly for Internet Explorer 8 and Mozilla Firefox 3.

Problems started kicking in, however, when I switched to testing for Internet Explorer 7 (or IE8/Compatibility).

Problems with FancyBox 1.2.6 in Internet Explorer 7

The main viewport of Vista gets cut off in Internet Explorer 7.

The main window where the Vista application was supposed to be running has its display cut off in IE7. Hence, the whole interface cannot be seen, even with all that space around.

I got down and dirty with it, and it seems that IE7 is having trouble setting some styles for some DOM elements using JavaScript (which we’re using because of jQuery), specifically for IFRAMEs. Did some digging over the net, but couldn’t really find a solution for it.

If you’re having the same troubles as I am, this is the solution that worked for me. I manually modified the JavaScript code of FancyBox (in jquery.fancybox-1.2.6.js) at around line 220 as follows:

$("#fancy_content").css({
'top'     : pad + 'px',
'right'   : pad + 'px',
'bottom'  : pad + 'px',
'left'    : pad + 'px',
'width'   : opts.frameWidth,
'height'  : opts.frameHeight
//'width'		: 'auto',
//'height'	: 'auto'
});

What this does is modify the styles of the IFRAME that the JavaScript creates. Instead of letting the browser figure out the height and width of IFRAME inside the window (letting the browser go ‘auto’), you tell it explicitly to use the whole space available for it (the size of the “frame” enclosing the IFRAME, if that makes sense). Apparently, Internet Explorer 7 makes very bad decisions when determining widths and heights of frames, or so I think.

After the modification, Vista rendered quite nicely even on IE7. One drawback of this would be that your IFRAME would always be as big as the window that’s showing it, but I really don’t see why you’d want it otherwise anyway.

Read More

My baby and I turned a formal one year together last December 18, and, unfortunately, finding the time for a post to commemorate it had been quite challenging. That’s, of course, no excuse, but I don’t mean to redeem myself anyway.

A (Late) Happie Anniversarie Post

It’s definitely strong of Jozen to willingly make so much effort in maintaining our relationship, considering that we’re literally half the world apart. For the past year that we’ve been together, we’ve really “been together” for only 40 days, when she came back home here in the Philippines during April. So it isn’t really that hard to count:

  • We’ve had 40 days together physically
  • 40 dates as well
  • we’ve had one vacation together (that was in Boracay)
  • 37 days I visited her in her home (minus the times we were in Boracay)
  • five times (I think) that she came to my office to visit
  • (so that’s also four free Caramel Macchiatos from Starbucks, and a Baconator meal)
  • three trips to go swimming
  • three trips out to meet her (and mine, on some occasions) friends
  • and 365 days that we talked, either on the phone or in person.

It wasn’t easy, but I’m proud to say that we haven’t missed a day of talking, and I guess that’s really what kept us together despite the distance. Although it’d be a cold day in June before I’d stop wishing that going from the Philippines to Canada was just a jeepney ride or two away, in some great ways, the distance helped us get to this point.

Our relationship would definitely have been so much different if we were actually together, because there would be less talking. I might not know right now the peculiar manner in which she says “yehey”, or how her voice drops three octaves when she’s quoting somebody (whether they be male or female), or how she loves Mikado and their spider rolls, or that Brittany Murphy was Ashton Kutcher’s ex-girlfriend (don’t bash me on this). Maybe I wouldn’t realize right now how she’s the perfect girlfriend.

So, to my perfect girlfriend, raise a glass, let’s have a toast, and let’s drink a sip for the both of us. I’m definitely staying with you, and that I clearly know for sure.

Happy anniversary! Here’s to more years together.

Read More

I was searching for good article ideas to write for in our news site, The News Chronicle, earlier today, when I stumbled upon this article from TechCrunch about Google’s Liquid Galaxy. I thought that it was a pretty sweet contraption, seriously!

For those unfamiliar with what Liquid Galaxy is, it’s a great mash-up of Google Maps’ Street View feature with some sweet engineering. It’s basically just a bunch of computer screens facing each other in a circle. You can stand in the middle, and the screens will show you different views from different angles of Google Street View. What it effectively does is that it recreates the experience of being in that actual place virtually.

Googles Liquid Galaxy is one SWEET machine

The video below shows some footage shot by the TechCrunch team from Google’s last I/O conference earlier this year, and the machine can also simulate travelling down the roads. Pretty sweet. Very, very nice.

Imagine walking over to some office in California so that you can experience walking down the streets of Paris! Think of the possibilities!

What’s even more amazing is that the idea for Liquid Galaxy was conceptualized and manufactured into reality by some Google employees as part of their “20% time projects”. I recently learned this myself, but apparently, Google employees are entitled to what they call “20% time”, which basically means that out of their five-day workweek, they’re entitled to a day off from their normal work responsibilities so that they can pursue their own ideas and projects.

I think that idea is golden. I’d love to have a concretely defined portion of my work time dedicated to my own tinkerings. Haha, my head is always buzzing with ideas that I’ve always wanted to start up on, but just can’t find the time for.

For these guys, all it took was a simple idea, that blind jump into taking chances to actually implement it, and the facilities to actually make that jump. How I wish everyone could do the same.

[XQ6YJZRJZFH8]

Read More

Programmers take pride in building elegant solutions: code that can solve the most complex problems, but in as little code as possible while being readable by human beings. A program’s code can grow very complex very quickly – with each addition of a feature or each correction of a problem, code can branch out, diverge, and essentially add more computer jargon into an already unreadable mishmash of letters and numbers.

Programmers need elegant solutions.

Which brings me to an anecdote about work two nights ago. Because of a kink in what our customer wanted with their application, we had to figure out a way to round a decimal number to the nearest whole number (i.e. 92.43 = 92, and 65.8923 = 66). While this may sound just like simple math, the programming language we were working with had no automatic way to do this, so we had to fashion one ourselves.

After much deliberation and much brainstorming, we came up with the following solution (pseudocode):

my_number = 92.43
my_remainder = my_number / 1.00
if (my_remainder < 0.5) then
my_new_number = cint(my_number)
else
my_new_number = cint(my_number + 1)
end if

which basically does the following :

  • Get your number
  • Divide it by 1; you’ll get the part of the number after the decimal point as remainder
  • If the remainder is less than 0.5, then just take off everything after the decimal point, and you’ve got your answer.
  • If the remainder is greater than 0.5 however, add 1 to the number, THEN take off everything after the decimal point.
  • After all that, you’ve got your new number, rounded to the nearest whole number.

While we were satisfied with that (after all, it’s concise, straightforward, and does what it needs to do), we had to do a double-take when a colleague read what we had done, and suggested the following instead :

my_new_number = cint(my_number + 0.5)

which does the following :

  • Add 0.5 to your original number.
  • Cut off everything after the decimal point.
  • And you’ve got your new number. Again, rounded to the nearest whole number.

And that’s exactly how solutions should be. He managed to do in one line of code what we did in seven. His logic of his code definitely works (try it yourself) and it’s definitely easier to read and understand than all the jargon we punched in right before.

Whenever I encounter something like this (not just in programming, but in everyday life in general), I can’t help but just take a few moments to admire it. It takes a right fashion of mind for stuff like this to come to someone, especially in our every day where we are confronted with problems thousands of times more complex than just rounding a number off, every single moment of our lives.

For a lot of problems we have to deal with, solutions are seldom as relatively simple as this. I just hope that when one does exist, that we have the clarity of mind to realize it.

Read More

Chingching and me formally turns 11 months old today! :D

11++ months

Boracay, May 2009! The place might have become much more commercialized during the past years, but we definitely still had the time of our lives when we travelled there.

And I can definitely say that Chingching’s a keeper.

Happy monthsarie babie.

And yes, we definitely need more pictures together. :p

Read More

Friday is glutton day for most, and my last one wasn’t an exception. An all-nighter in office had us eating off Pringles cans, one or two bottles of MineShine, a 3.4-liter bucket of Selecta Vanilla ice cream, seafood ramen, a platter of spicy tuna maki, miscellaneous chips and probably 5 to 6 cups of coffee, all from 2pm Friday to around 6am Saturday. But, I have to say, the Ridiculous Burger Challenge that (mid)night had to be most noteworthy.

It was my first time drudging through NALA shift at the office (lasts from 7pm to 5am normally), and when the guys were calling for a midnight dinner out, they decided that it was time for me to take the Ridiculous Burger Challenge (ominous drum roll here).

Ridiculous Friday

The challenge is held over at Burger Avenue, along Makati Ave – on your left side if you were driving away from the triangle. The challenge gives you a plate with lettuce, tomatoes, cheese and three 1/3 pound freshly-grilled beef patties sandwiched in two hamburger buns. If you can eat it all in five minutes, you get it for free.

Ridiculous FridayI doubt anyone who’s actually set on winning the challenge would look this enthused (or clean)
Ridiculous FridayThe burger must have been so scared with me looking at it like so.

That had to be the messiest meal in my whole life. Didn’t really make it go any easier that everybody was watching with cameras and whatnot, but what the hell. As soon as the clock started, I attacked the still-wrapped burger; three seconds into, and I had the burger disassembled into neat stacks.

I started with one of the patties, then another and then another, stopping in between to chomp on lettuce and tomatoes. During the time it takes to actually chew, I broke the buns into small, bite-size pieces. All the guys were cheering, James and Keno (I think) had cameras on, and Cathy was fanning the thing like mad, so that I don’t get burned holding the patties.

I finished the whole thing off in approximately four minutes.

The burger tasted good (I think – I didn’t really notice), but I just wish that I enjoyed it more. You really can’t (no matter what anyone tells you) if you don’t get a chance to stop and savor a flame-grilled burger. Hahaha!

So, yeah! All in all, I got my Php270 back, one of the waitresses took my autograph (er, sort of. For the winner tally.), another took my picture (yeah, again for the winner tally), and I used the money to buy a can of Coke. A little afterwards, we all went back to office to finish up our work.

I’m expecting a video of that uploaded to YouTube or Facebook anytime soon, so for the meantime, I’ll just enjoy a quiet life. :p

Ridiculous FridayThe placard says “I invaded Burger Avenue”. And, yes, that’s how I look after scarfing down a one-pound burger.
Read More

I went out of my way today, as I find myself to be doing every year since I started working in Fujitsu Ten, to buy myself a Grande Toffee Nut Frappuccino from Starbucks (as usual, with the added shot of Hazelnut syrup). I just found out tonight that the new Starbucks Planner for 2010 is out!

And so starts my (and most everyone else’s) quest to collect stickers.

2010 Starbucks Planner

One of the new designs for the 2010 Starbucks Planner. (photo from Our Awesome Planet)

Unfortunately, I didn’t have my camera handy today, so I couldn’t snap my own pictures, so forgive me for scrapping off Anton’s pictures on Our Awesome Planet.

And again, unfortunately, I didn’t have much time to actually peruse the thing, but what really hit my senses right away was that, even from afar, the new planners seem to be a big improvement over last year’s.

And yes, planners, as in more than one. The 2010 Starbucks planner has three different cover designs, all of which feature great black and white photography of coffee paraphernalia. What’s even awed me more was that the planners were bound with a light felt cover, giving it a somewhat comfortable, fuzzy feel.

I wasn’t able to check whether or not the three designs also featured different aesthetics inside their pages, but from the copy that I was able to open, the inside layout of the planners was also nothing to frown about. It looks really elegant, with the simplistic design characterized by Starbucks, and also with color separator pages between the months (I’ve really loved flipping through past planners just to look at these).

I really had a regrettably short time to actually observe the planners in detail, but I plan to snap some pictures of them probably tomorrow. At least, I have more of a reason to take the time to scoop that Caramel Macchiatto before the workday. :p

Read More