How to do logging in CakePHP

Okay, I realized this long ago but it annoys me that every time I just forget this. Sometime, when debugging CakePHP, the most direct method is to simply log an error. It’s like ‘trace’ in Actionscript or just a println() in Java. Anyway, here it is:

[code lang=”php”]$this->log(“Log anything here.”);[/code]

This can be called from the controller. Continue reading “How to do logging in CakePHP”

This disappointment I have

I’m kinda disappointment. I am not good at these things – telling out why I am disappointment, why I am just feeling sad. It’s not the easiest thing to tell too I guess.┬áMaybe things would get better. Maybe I’ll just forget like the way…

I wish these memories can stop attacking me. Wish that they would depart my mind already so packed. Wished it would just end. I can’t really take that much longer. I keep asking myself so many questions when I don’t have the answers.

Why now? Why now? Why now? Why Murphy’s Law?

BBC and Firefox 3 redesigned

It appears that BBC has undergone a redesign. It looks much cleaner now and I am still trying to figure out where to start. Previously BBC tries to push more information to the user. Today’s BBC tries to get the user to learn about what’s available and let them choose the content for themselves. It’s kinda a slightly refreshing approach to online news which often confuse me with too much pieces of news in one page. Try minimizing everything. I sort of feel happier seeing no information than some information, hahaa…

And also, Firefox 3’s new interface has gotten better. Ars did is a good write-up on what’s coming up. Honestly, I don’t like their back and front buttons. It looks almost hideous.

By the way Ars is one of the best websites to read about interfaces I notice. They don’t just take a bunch of screenshots that throw it online, Ars crops it nicely so you don’t have to move from page to page clicking and clicking. It’s a good effort.

Hat tip: citizen geek

My examinations are not too far away

Looking at the list below makes me a little nervous.

Examinations are coming

  • Mathematics For Computing (6 May)
  • Information Systems: Foundations of E-Business (9 May)
  • Introduction to Computing and the Internet (12 May)
  • Introduction to Java and object-oriented programming (15 May)

There are just so many things to study and I don’t know where to begin actually.

I haven’t actually started to read through the stuff that’s coming out for examinations. I don’t really have a lot of time to do that. I think I’m getting a little stressed with my work too. I wonder if I’ll be able to get through this and still get the good results and the produce good work. I still have another concern though and that concern is perhaps the most troubling.

Baby steps to popularize i.justrealized.com

i.justrealized.com now has a Technorati page. I’m trying to get i.justrealized.com to be popular without using my other blog to pull visitors.

I think this would be a good chance to learn about internet marketing and search engine optimization. Today this blog has 4 unique visitors. Hopefully it would grow soon. I’ll blog about the results of the progress of this blog. I distance myself from making use of my other blogs or my friends’ blogs. I wanted this to be an experiment. It will show interesting results.

And so far, this is my first step – get my blog on Technorati.

Spastic face above.

The disadvantages of Media Temple as your host

I’m losing patience with Media Temple. I pay around 20USD per month for Media Temple’s Grid-Service and I’m starting to wonder if it’s just some sort of a marketing thing. They made it sound so reliable and blah blah but in reality it’s feels kinda slow. Media Temple serves huge files pretty quickly. Unfortunately, when it comes to responding to requests, they seem slowly than other web hosts.

Anyway I filed a support ticket complaining that their database seemed problematic.

My support ticket on 2008/03/31 11:28

I get this Error establishing a database connection.

And I can’t access phpmyadmin, it says too many connections. What’s happening?

The database seem to be problematic…

By the way, Firefox’s dictionary suggested ‘phpmyadmin’ to be corrected to ‘badminton’. And this is the reply I get from them. Basically, they’re trying to get me to pay more money again.

Support response on 2008/04/01 20:39

Sorry for any inconvenience that you may have experienced by this. We also apologize for any lack of information provided to you. I’ll try to explain the best that I can.

Essentially you are in a shared server environment. The (gs) Grid runs off of a cluster of servers and provides resources to multiple users at once. In that, you also share database servers and the resources provided. When a “Bad Neighbor” performs some sort of unauthorized action, such as running scripts or queries that are configured to run for long periods of time and consume large amounts of resources.

When you are receiving the “too many connections” error, this means your are experiencing the “Bad Neighbor Affect”. Meaning that someone else has caused the server to reach a high load. When this happens, the database is isolated and that particular “Bad Neighbor” is bumped off of the database server and notified of their actions. During this time is when you are receiving the error. Once everything is resolved the database is restored and accessible again. Continue reading “The disadvantages of Media Temple as your host”

Blogging is addictive again

I own another blog and I haven’t been updating much there. I have about erm 1700 posts there. But many are YouTube videos and it’s getting a little sick. Plus I made a lot of mistakes there that perhaps I’ll speak out one day. The blog contains memories good and bad. This is perhaps a new start.

And it starts with 2.5 WordPress. Very slick and pretty version of WordPress, I find myself fondling the buttons to more often now. It’s amazing how an interface change could get me excited again.

We always need facelifts, don’t we? These little changes re-motivates us. Even if you have a spouse, you would want little changes. Maybe simple changes like:

  • He or she brought you to the movies again after 10 years.
  • Dress up specially for an occasion you thought no longer mattered – read anniversary.
  • Start talking to your friends instead of pretending to be invisible.
  • Erm, dye some hair? I don’t know.

Many things can re-ignite interest. The same with blogging. And the same applies to work, school and life. Work can be addictive. School can be addictive. And lastly, life should be addictive.

How much time I spent on reorganizing my computer

Okay, as I was saying, my computer’s getting kinda cluttered and things are just getting harder and harder to find. I use Windows Vista Business, I have multiple copies of Apache, MySQL, Ruby, PHP and other this sort of programs in my computer. If you don’t know what they are, you probably wouldn’t like my blog, maybe you’d be better off at BoingBoing or watching some inspiring videos at TED.

The problem with having multiple copies is that you don’t know when to launch what. Every time I want to – say – launch MySQL, I start thinking really hard which folder should I go into. And when my mind is kinda switching off I often find my mouse pointer moving towards Safari browser icon and visiting Digg.com. Counter-productivity at the very best or worst – you decide.

I always tell myself, okay, next time when I re-setup my computer I’ll do this and that and so on… Each time I re-setup my computer, I always find a flaw with my existing setup. I will restructure my folders again, partition things differently this time. And I always have this optimistic thought that this time I’m really getting it right.

I rarely do. Two months later I would look back at my system thinking of new ways to refine my setup for the future.

Maybe the problem isn’t with me. Maybe the problem is with just the way computers are. All these labyrinth-like hierarchy of folders, it’s more messy than my family tree. Some day, we should kill the ideas of folders, they’re a good way of organizing things but today with people storing more and more files, the concept of folders is hardly a good idea.

justrealized.com was once registered

Interestingly, I’m not the first one to want to register the domain name justrealized.com. Back in the 2000s, justrealized.com was actually register. It was then deleted on December 29, 2005 according to eXpiresoft.

Who would actually want such a long domain name I thought. I wasn’t even in a hurry to register it, figuring out no one probably would think of this name. And you know before I hit the ‘Checkout’ button at GoDaddy, I was still thinking really hard if this is the right choice. The next moment, my right index finger click the mouse button by itself. Wasn’t me!

I spend a good part of my time setting things up, putting on a half-assed theme that can only impress a three-year-old. I am trying to find ways to increase productivity in web development. My computer is facing the classic case where more is needn’t necessarily good and lesser could’ve just been a hell lot better.

I just realized I am going out of point. I shall add a new post with a new subject to remain relevant.

It is April Fools’ Day

I didn’t know it’s April Fools’ Day until…

Conversation at 1:45 AM

Wynn: not sleeping ar?
Wynn: tmr got class leh
KahWee: got what class leh
KahWee: got meh
Wynn: ya
Wynn: 9am
KahWee: oh… is it
KahWee: what class is that
Wynn: 108
KahWee: huh
KahWee: really ar
Wynn: april fool
Wynn:
KahWee:

108 is one of the modules I take at school. So fast and it’s April 1st already. Time really flies. April Fools’ a good day to check out the web. Companies like Google always have something prepared for you – typically making some bogus announcement. Some of the not-too-funny April Fools’ pranks include: Continue reading “It is April Fools’ Day”