Search This Blog

Monday, March 21, 2011

Dream anomaly?

Just earlier today at around 5am, I was awoken from a very bad dream (or nightmare).  But I was surprised to realize that I was able to deduce that I was inside a dream.  Sounds like in the movies yes, but I did.
Here are the combinations or factors that (which I think) made it possible:


  1. You have to wake up at least once and then get back IMMEDIATELY.  I think it is required that you "re-enter" your dreamstate as quickly as possible after being awake.  Otherwise, you might lose the "connection" to that dream.
  2. The dream/nightmare has to be continuous.  If you watch movies or play music then you'll be familiar with the "pause" button.  You click it to "suspend" the media from playing "without restarting".  And you press it again to "resume" the playing.  The dream should also be like this.  It's hard and I don't know how to command it, it just so happens that some of my dreams are like that.  I wake up like running from a place, woke up and when i fall back to sleep I am right back in the running scene.  If that doesn't happen then just like in the first factor you might lose the "connection".
  3. You should try or be able to pick-up part of reality in the awaken state (ex. by awake you know that you're no longer dreaming) and then as soon as you get back to your dreamstate it should be carried over.  Fortunately I think that's what happened to me.  Since the time lapse between being awake and back in dreamland was very minute (maybe less than a minute) then I think I was able to "capture" that "awaken state" and took it with me back in dreamland.


Back in the nightmare, when it seemed to me that some things are not right in the settings, I suddenly realize "hey, I was already awake, so this means it's just a dream".
Unfortunately, I couldn't wake myself up even after that realization.  But at least I was able to scream since I thought this was my chance to be awaken.

Happy dreaming to us all!

Thursday, May 27, 2010

self reminder

this will be all too familiar to all of you since there are times we talk to ourselves when in a situation or doing something.  i'll just share some thoughts to you on how i integrate God with my attitude in life and in other things --- here they are:

"The best kind of help that you can give is when you yourself needs some help"
When rich people give donations we just say, oh that's no big deal to them.  But when we read a story of someone who has one bread to eat and then shares it with someone else, we see greatness.

"It's better to praise and thank God for even the littlest thing that happen to your life than curse and blame Him for even the smallest problems you encounter"
Unfortunately most of us only remember God when we have problems, and worse we blame Him for that instead of seeking His help and keeping the faith that He'll get us out of that problem.
Do you think you got promoted because of how good you are and that God has nothing to do with it?  Remember what happened to Titanic?  The engineer thought he was so good that not even God can sink that ship... so don't be like the Titanic engineer.  Instead be a Noah

Saturday, October 10, 2009

No-brainer braindrain

Recently I've been reading articles on the web about high paying jobs, just not offered here in the Philippines. Of course it's common to see IT jobs on top 3 of the list, but I was impressed that a teaching profession actually came in 2nd place after a senior IT position.
I don't know if it's more difficult to teach other nationalities from abroad and even it is, the pay rate of teachers here in the Philippines doesn't even come close to 1/4 of what is offered abroad.
I am mainly an IT professional on the software development category but I also had teaching experience just recently when the global financial crisis caused massive layoffs even for the highly successful companies. I'm saying this because I'm not just writing about the sentiments of teachers that keep pleading to get a salary increase, but also because I was once in their situation and it's not that easy to teach, trust me I thought it would be a walk in the park compared with software development but it wasn't. It still requires a lot of dedication to teach classes if you want to be a good instructor.
When I read this article, I thought to myself "if only our teachers here get paid even half the amount offered abroad, a lot of good professors would still be here in our country teaching our countrymen and producing more future leaders, engineers, inventors, or maybe even the CEO of a large company."
Brain drain has been going on since I can remember. And that was a long time ago. But the rate back then was not alarming compared to now. Back then it was mostly greener pasture that drove them to other countries, simply getting a better paycheck.
But now it's about survival. Yes, sad but true, majority of Filipinos go abroad just to survive.
They don't want to do it, but they have families to feed, children to send to school to have education, and future retirement plans to name a few of the reasons whey they "had to".
And this isn't limited to an individual trying to make a decent living; no, it doesn't just end there.
This has a domino effect on other Filipinos and the country as well. If all teachers, just for the sake of discussion, goes abroad to teach there, who would teach our children here?
Okay it might be a long shot but let's say some of the best teachers go abroad because they are qualified to work there, and that only second rate teachers were left here, what kind of education would our children get from school then?
And it's not just about teachers. We have doctors going abroad to be nurse because it pays more to be a nurse abroad than to be a doctor here, and that's just pathetic of what our country has become. It's like you're a college student here and you go to a high school abroad because you'll get more by doing that.
So what now? Some of us would blame the government for this. Some would blame the people for this. You can call it blame but I think the government is the one that should correct this problem. I know some people are lazy to work that's why they're not earning that much and some even don't have a job because of that; and that's a different issue.
I think if the government really wanted this country to improve like what the rulers in Dubai did, I believe it's very realistic and I believe it can be done.
I watched an episode in NatGeo about Dubai and that it was like a poor country back then populated with squatters, and now look at it, if I remember correctly it's the only country that has a 7-star hotel.
My point is simply this: government basically is the driver of a country, we are primarily passengers. No matter what we tell the driver, the driver is still the one holding the steering wheel. Let's build on this analogy so I can further clarify my belief.

Situation : approaching an intersection with a traffic light in place.

Case A. Bad driver, good backseat driver (or passenger that tells the driver what to do)

Driver doesn't respect the traffic lights. Passenger tells driver, to obey it, red means stop and green means go. Driver sees the red light and proceeded to cross.
What do you think would happen?

Case B. Good driver, bad backseat driver
Driver obeys the rules. Driver stopped on red light. Passenger told driver, step on the gas and let the other drivers worry about stopping when you cross. Driver ignores this bad suggestion and even told the passenger "you either obey the rule just like I do or take another vehicle"

So again, I believe that no matter how good we are, if we have a bad government then it's most likely that we're heading to an accident sooner or later.
But a good government with a discipline and the will to make progress happen, make people obey the law would have a very high probability of success.
I'm sure you've heard of bad drivers here that goes traffic sheep when they drive abroad. Why? Cause they know the law is enforced there and no amount of bribe or "connection" will exempt them from traffic violation. Another is the case of a lazy, unproductive worker here and is doing a great job abroad. Again, why? Because you get fired on the spot if you don't perform there.
We Filipinos have a lot of good attributes, we have a great history, we have great heroes and of course we have a great country but the problem is, we tolerate rotten tomatoes and discard the good ones. That's not exactly what is taught of us, but sadly that's what's happening.

But that's jumping ahead of topic; I think the best thing any country can do is keep it's resources inside AND add resources from outside. We should follow other countries that have done this successfully like Japan, Korea, China, others. If you look at how their leaders do it, you'll notice that although several of their own products are more expensive than the importer counterparts, they also make sure that their own people have enough income to afford them.
They help unemployed citizens get their job so they can contribute the country's success.
They use their taxes to improve roads, they create landmarks that are sources of tourism revenues, and most of all I think most of them (if not all) are disciplined especially their leaders.
If this country continues to ignore this brain drain problem, sooner or later the country will be like hell on earth, ruled by greedy people, traffic violators, lawless environment and a very high crime rate. Yes, at first it doesn't look that big of a problem, but just like cancer cells, if you ignore it and then it grows and scatters and dominates the host then it will be too late to remove them. By then the country might use chemo but just like real world cancer cells, not only does chemo kill the bad cancer cells, it also kills the good ones, and since at this stage the good ones are outnumbered by the cancer cells, the host will die even before it kills half the cancer cells.

I hope something pivotal happens by next year when we get another chance to select a leader that would turn this horror around and get us back in line to success story. There's still hope, just like they say, while there is life there is hope.

Tuesday, August 11, 2009

Spreading "The" Word

Recently I saw a video clip of Ninoy Aquino on 700club and after watching I just thought to myself "hey, this is a great time to capitalize on the momentum and push forward the message of God across the country and around the world".
See, most human beings take notice and take action when someone popular says something so obvious. And if we are also eager and willing to spread God's word, then let's be watchful of opportunities that arises. One thing I also did was forward that clip to my friends and peers and hopefully they continue to do the same.
Most of the time, people are deaf to topics concerning or involving their faith in God and my point is, when those ear-plugs seem to open up, we should be ready and take the opportunity to make those people hear again the good word.
It's true what Ninoy said, and I believe it personally that we usually talk to God in times of trouble but when we're okay and doing well we don't seem to care or even think about Him.
I'm not a saint, not even a regular church attendee but I do thank God everyday for the very basic things that only He can provide, and that is "life".
The rest would be our family, our health, our job, our friends and yes even our problems.
I also think that when problems come in numbers, it sometimes mean we're starting to forget Him and it's like a "pinch" or reminder from Him that almost says "hey, I'm still here, your Father in heaven, and your God".
And if we take the wrong interpretation to problems, thinking it's about punishment, then it would defeat us. But I'm not saying to welcome all problems and be happy about them. We can complain, yes I do that a lot, but inside I know it's a test. It's given to me so I can learn something new and become stronger, better person.
So what do I usually do when I talk to Him? First of all give thanks for all the basic things, well, almost all things actually. Then I go ask for forgiveness for my wrong doings and failures. I then ask for His guidance and help all day long so I don't go the wrong way.
I don't usually recite prayers, what I do believe is that if I talk to Him like a son would to his father or mother, then I think God would have preferrred it against me reciting a prayer.

And I have to quote Ted Failon also, he said "mabuti nang walang tulog, kesa walang gising".
And that's exactly why there are so many reasons to thank God everyday.
No life means no everything else (work, play, etc).
So to all of us, God bless and be a blessing to others.

Also, let's try helping street children as much as possible. Hopefully some agency take them and give a long term solution, I don't the government will ever do so I'm counting more on us individually and those Non-profit organizations.

Sunday, June 21, 2009

Creating a VB6+Python framework

Hi all, it's been a while since I wrote about framework on the Windows desktop. Now, I'll be sharing with you the framework that my friend and I are working on.
The inspiration was Django so we decided to try and pattern our framework in the hopes of achieving something that will simplify and speed up coding and eventually the software development process.

We tried out various approaches like using JSON to create a common data format. Oh by the way, what makes this framework unique is that we also intended it to make use of the Linux environment. Here's the plan:

The front end (the view and controller) would be developed on Windows using VB6. Why VB6? Cause VB.Net already has it's own framework and making another would simply be reinventing the wheel. Plus there are still a lot of developers using VB6 and it would be great to contribute something to this community.
Anyway, going back to the topic, the Linux participation would be utilizing the power of Python. Django was written in Python and we really appreciate how easy data handling was using it. So we thought of delegating this task (the model) to Python on Linux. Of course Python also works on Windows but we wanted to test it accross (Windows<->Linux).


I did mention JSON, and we thought it was a cool idea to use it as a model dictionary or how the data is described (what it contains, their data types, etc). No problem with it under Python.
Okay, comes the test on VB6. Since it's basically a JavaScript (ObjectNotation), then the first thing we need to accomplish is making javascript run under VB6.
Sounds like a really dead-end idea to most of us...yah I know, I got that impression too.

But hey, good thing there is the scripting library of VB6, I was able to evaluate and execute javascripts from within VB6. So now the problem is solved....or is it?

Unfortunately, my joy of having been able to run javascript on VB6 was shortlived. Parsing basic JSON objects and dictionaries was no problem, but the solution failed when we tried parsing the JSON array.
In javascript, the square brackets denote array content but it was returned as a string in VB6.
I thought we made a typo so what I did was create an HTML with javascript.

Hmmm...HTML? Aren't we discussing desktop framework here?

Yes, but I'm no expert in Java and I only know a little of javascript so I needed to test the JSON array using javascript as my only option. Okay, it turned out that the JSON array was correct in format, I was able to prove it using javascript on an HTML page.
So I deduced the problem was how VB6 scripting handles the JSON code. I hope I'm wrong but back when I was testing it, I can't make VB6 scripting understand the array notation.

Anyway, out of frustration we turned our attention to another approach, another data holder.
We thought first of XML, then we thought it would be more complicated compared to JSON and YAML. We then looked at Dictionary of VB6.
Okay it worked. But there are times when you don't need a "key" for your list so we tested the Collection data type. Now, it was very easy porting VB6 dictionary to Python, but it was a dead-end using Collection.
In VB6 no problem, but in order for Python to use it, it has to know the Object.ClassID.
For dictionary it would be "Scripting.Dictionary", but in Collection not that possible.
We used VB6's object viewer to find out where this collection resides in.
So we saw "VBA.Collection". Nice, we found it!
Python was having problems using it. So I tested it under VB6, simulating how Python would call it.

So instead of using:

Set ThisCol = new Collection

I tested it using

Set ThisCol = CreateObject("VBA.Collection")

And it didn't work!!!! Darn!!!
I had to Google a solution but there's none. I searched several forums and most of them also had the same problem and none has found a solution. Quite frustrating don't you think?

I'm using Windows, VB6, and then tried to use another Microsoft Product (the Collection), and it won't work. This is one of the reasons other developers are parting away from MS, product incompatibilities (when they are all under on parent company).
But I'm not here to rant about my frustrations, so I'll get back to my topic.

So we're stuck. No. We won't just give up on this one. We'll find a way to make something work, even if we reinvent some wheels.
A solution we saw on the internet was to create a wrapper for the collection so it can be used on Python (or any other language). It would work, but for me it was like a dirty solution.
I wasn't content with having used it just for the sake of making it work.

If we were to create such a wrapper then we make a good one to start with.
After hours of drawing on paper and several combinations of data structure, simulations and questions on how the new idea would work, we found an acceptable solution.

Yes we did, we we're able to use successfully and have progressed faster compared when we first approached this idea.

Next time, I'll discuss some of the things we did and maybe some progress we made. Thanks for viewing! See you next time.

Going dual

Sometimes, one is really not enough. In the case of blogging, one blog site won't cut it. So I made another blog which I made using Google App Engine, although it's more of a tutorial than a blog. But anyway, what I'm saying is I might not be able to update my blogs as often but I will definitely do.
I will also be working on a full time job next month so that would also cut off some of my time on the internet, but hopefully I can still keep up.

Here are my other sites in case you want to visit:

http://vegitz.appspot.com/
http://biznizcom.appspot.com/

Thanks

Sunday, June 14, 2009

Why still use VB6

Well, that depends on who you ask that question to. If you ask that to a VB6 programmer, you'll hear all the good things about the language. If you ask it from someone who hates VB6 then you'll hear all the bad things this language has and might even insult the programmers using it.

So without getting personal on the answer, how should we answer this question and every other similar questions?

The answer is "objectively".

Yes, I know there are still so many programmers that behave like martial artists of a certain school --- always claiming their school and style is the best and theirs can beat anything else.

But take note also that other programming languages suffer the same insult and discrimination simply because of this mentality. So let's list some of the bad and good that VB6 has, and not make judgments based on personal preference.

So what's bad about VB6?

B01 - it's not fully OOP compliant.
-----------------------------------
I guess it's because VB6 was not intended for OOP in the first place.

B02 - it's not strict when it comes to declarations and indentations
-------------------------------------------------------------------
Okay, true. VB6 allows you to use variable "X" without declaring it.
You can also put more than one statement in one line and it would still work as long the statements are valid.

B03 - it's slow
--------------
Yep, if you want speed go use C/C++. If you want to write a game, you won't have the speed that other games developed in C++ has. If you want to talk to a hardware, this has limited set of APIs but they are just wrappers and therefore slower compared to direct hardware calls like in assembly.

B04 - it's no longer supported by MS
--------------------------------------
True. You got a problem with your VB6 code, search the internet for forums that discuss VB6 or ask your peers that use it.

B05 - Anything else I might have missed.
------------------------------------------
I don't have a full list so I probably failed to mention other reasons.


And what's good about VB6?

G01 - three letters : RAD
--------------------------
Maybe not right now, but it was on top of the RAD ("Rapid" Application Development) programming languages for a long time.
There wasn't any other language that can create an application that fast and that easy like VB6.

G02 - it's simple to understand
--------------------------------
It should be since it was modeled after the BASIC generations (BASIC, BASICA, GWBasic, QBasic and TurboBasic). Its keywords were one of the (if not the) simplest. To print something it has the "print" statement. You want to display a message box or prompt to a user, use "msgbox".

G03 - it does the job
----------------------
Not all but a lot of applications and systems are built using VB6. These applications are used by large companies for handling production activities and transactions. Writing a similar application in another language would take more time.

G04 - it had a lot of support from other developers
----------------------------------------------------
Back when it was VB3.0 it already had some cool controls that you can just paste onto the form and use like the drive, folder and file list boxes. Since then, a lot of developers created custom controls to be used for VB, some were written in C/C++.
To a developer, this was great news as more technologies are available for use.

Well, this is how I would answer the question and any other similar questions. For me, there is no perfect language. Every one of the programming languages have their own strengths and weaknesses. Honestly it's pointless to try and pin point the best language, if I had to choose then I'd pick C++. Why? Cause as old as it is, it's still being used and is highly regarded in the IT world when you want to get something done.
Not only that, a lot other programming languages were developed using C++ (please correct me if I'm wrong but I believe Java and Python are some of the great languages that came out from C++). But as magnificent as it is, it still has some cons. One is that it will take considerable length of time to create a simple GUI application using it. Java is also a great language but you'll still hear some criticisms about it.

To me, these are all tools. Tools available to any developer. Why waste time debating what's the best? Why not just use the best at the moment or the best for a task? And why not combine these tools to create a better application? Why not strenghten a language's weaknesses instead of criticizing them?

And to answer the blog question, I say "why not?"