Failure

Have you ever noticed that when everything goes as planned, you actually learn less? Do not be afraid to fail. Think of it this way: there’s not much to learn when things work. When they fail however, you have a chance to understand where the boundaries are, providing us an opportunity to learn more when things go awry.



Edison quote mug by ~estranged-illusions on deviantART


Imagine: After creating a program and testing it against the known correct results, everything works. Congratulations! You just learned how to solve the problem. BUT! Consider this- When you test your program and something goes wrong, what do you do? Give up? Of course not! One of the best ways to study programming is through trial and error, and being wrong is an integral part of the learning process. When the program doesn't work as intended, we find the bugs and fix it. We test more. We think more. We learn more.

However, constant failure is another beast entirely. The saying goes: "Fool me once, shame on you, Fool me twice, shame on me". This is particularly true in programming, where a correct line of code will always produce the correct output and vice versa.

A professor in a prestigeous college once said that programming is a routinary job- eg. doing the same things over and over again. This true only when the programmer is NOT learning, and is constantly wrong, and thus have to repeat his job over and over again. A real programmer writes code only once, tests and tweaks for errors, learning what to do and what not to do along the way, and reuses old code extensively. Strive to be that kind of programmer.

Until next time, Sayonara~

Dates and Primary Keys

I've got a story to tell :D I remembered this because one of my current coworkers asked me about the curious way I write dates in code (such as 10X23, or 10902). After telling the tale, I decided to also share my experience to you guys~

T'was a dark and stormy night..

It was a dark and stormy night by =aki-no-mia on deviantART
[/kidding]

Anyway, several months before I started in my current job, I got this project to expand an HR tracking software from a local startup. It was a fairly simple project and the company already has a small internal development team that is doing another part of the system (the Point-of-Sale, if I'm not mistaken). Not only that, but an ISO 9001 Audit was ongoing in the other departments of the company- with people rifling through databases and checking that everything has a trail (eg. properly documented).

One of the Database Tables had a column named "ID", which is the table's primary key. The data was formatted like so: 20100123, 20100202, etc. Obviously, it was in a YYYYMMDD date format, so this is what the auditor did:

1.) Change the key of one record from 20100129 to 20090101, which is a valid key
2.) Open the 2010 monthly reports.

And lo and behold, the record disappeared from the reports. It turned out that one of their developers was using the ID of the records to filter the reports:

If CDbl(Record.ID) >= 100000 Then Report.Add(Record)

I don't know if it was brilliance or plain stupidity. I guess it does work. IDs are supposed to IDentify specific records, and not keep track of dates- its data formatting does not, should NOT matter.

As a workaround, the Senior Dev (who was pissed and almost fired the dev responsible) instructed us to use the following date format: YYMDD - Two digits for the year, One AlphaNum for the month, and two digits for the day. The month AlphaNum works like so: 1 through 9 for January to September, X for October, Y for November and Z for December.

Now THAT is brilliance: It shortened the ID from 8 digits to just 5 and prevented devs from converting the IDs to numbers and using them mathematically :D

Until next time, Sayonara~

Optimus Prime (a.k.a Transformational Leadership)

Attending a seminar at Newlife is one-part worship, one-part pure content, and one-part advertisement. Anyways, me and the systems department where I'm currently employed attended this seminar there called "Transformational Leadership", sponsored (prominently) by World Vision. It was a good seminar, although the speaker (Pastor Boris Joaquin) was not very engaging, but still- I'd like to share a few thoughts about it~

Ok, what striked me the most is the 5-part "Training Cycle"
  1. "The Teaching"
    • Develop their skills through detailed instructions 
    • Stay with your "disciple" every step of the way
  2. "The Demonstration"
    • Show, don't tell
    • Let the "disciple" try their skills out in real situations
  3. "The Coaching"
    • Find their flaws, make constructive criticism 
    • Inspire your "disciple" to increase his/her skills
  4. "The Release"
    • Stay in the background, help only when necessary
    • Give the "disciple" the power to decide for him/herself 
  5. "The Next Generation" 
    • Confirm that your visions and goals are still aligned
    • Let your "disciple" spread his expertise to others through this 5-part cycle

Another topic that I liked is the transformational leadership model~ This is how I understood it..
  • Start with yourself, to give yourself some perspective. If your don't walk the talk, then you'll lose followers faster than you can gain them. [Additional Reading: Mat.3:13-4:11]
  • One-on-one with a few of your most trusted people. Don't try to "change the world" as soon as you can, start with those nearest and most open to you. [Mat.4:18-22]
  • Start building your team. Let your 'chosen few' choose their own 'chosen few', stay in the background and guide the vision of your community. [Mat.10:5-10, Mat.28:19-20]
I guess that's that, I've got an "Open Source" seminar to prep, so expect the slides about it on my next post. Until then, Sayonara :D

Object-Oriented Seminar

Slide Notes Here: http://ow.ly/2Coay
After a few weeks, I was finally able to continue my seminar on 3P.Net~ Btw, The slides above have the same opening as the last one (first three or four slides, I think) and most of the juicy parts are on the slide notes. I have already touched on Lazy Initialization and Singletons in this blog, and I've talked about object-oriented programming stuff as well, so I don't think I should more stuff in this post :D

If you have any questions, clarifications or suggestions about any of the topics I've discussed in this blog, just message me in my Google Profile, Facebook or Twitter. Until next time, sayonara~

Importing Inherited Implements

What’s the difference between Imports, Inherits and Implements?

Imports
…lets the developer USE a Namespace, using a referenced library; eg. the Math Object is under the System Namespace, so in order to use the functions that it shares, you’ll declare “Imports System.Math” somewhere in your code.You can use any library that you have referenced in your project WITHOUT using Imports keyword by typing the full class path, eg. “a = System.Math.Abs(10.2);”. By using the Imports keyword, however, you can shorten the line of code to just “a = Abs(10.2);”.

Implements
…lets the developer EXTEND a Class, using an Interface. These interfaces usually start with the capital I in front of them, and implementing one of these would force a class to use certain names and types of certain methods and properties. You have to explicitly declare these constraints, or the class will not compile. However: the Interface itself cannot contain any code, it just enforces a pattern so that other objects can call a generic interface to address multiple implementations.

Inherits
…also lets the developer EXTEND a Class, but this time using a base class. The base class are complete classes with working methods and properties. It does not enforce any constraints to the class that’s inheriting it (unlike Interfaces) so you can overload (or choose to ignore) any method you like.

~~~

An Analogy: Everyone can become Wet. Dogs are Animals. Cats are Animals. All Carnivores can eat Meat.

Now, since everyone can access the method MakeWet, then an “Imports System.Water” might have been declared, so that everyone can just call the Method “MakeWet” instead of repeatedly writing “System.Water.MakeWet”.

We can say that both Dogs and Cats implement the interface IAnimal. This way, we can give both of them the method IAnimal.Talk() and force the coder to write code inside the function. Afterwards, since all animals have the same method name ‘Talk()’, we can use them like so:
Zoo.Add(New Dog)
Zoo.Add(New Cat)
For Each Animal as IAnimal in Zoo
Animal.Talk()
End For
// Output:
// ”Woof Woof”
// ”Meow Meow”
However, all animals eat alike. Instead of copy-pasting the eat method on each animal, lets just have them inherit the Base Class clsCarnivore, which automatically gives them the method ‘EatMeat’. Of course, if an animal only eats certain kinds of meat, we can overload the method, but if not, no extra code is needed.

There, and done~! Don’t get confused.. Until next post, Sayonara~

w00+! Btw, what's the opposite of writer's block?

Ok, so I said quite a few posts back that I'm pulling back on blog posts to focus on my new job at Isuzu Automotive. However, I'm quite inspired these past few days (maybe because of the thrill of educating again), and I'm currently writing 3 blog posts for you guys ^^ Yey!

Now, I'm about finished with the first one: Inherits Implements and Imports, so that'll go up approximately tomorrow evening. One of my superiors asked me about the difference between them, and I couldn't remember off the top of my head. So I decided to do some research and write about it here.

Next is a fun post, which will also be the first post on my new (!!) blog: FinalFantasy14.Philippines. I got a Beta Key for the Square-Enix's upcoming MMORPG: Final Fantasy 14, and I'll try to document what I learn and share the experience in a filipino player's perspective.

Lastly, I'm writing something about developing Android Applications. I brought an HTC Wildfire last week, and I'm kindof intrigued with the development of Android as an operating system.

Ok, that's it! I need to go write some more~ Sayonara, for now!

Trippy Dot Net

Slide Notes Here: http://ow.ly/2qFmJ


2nd seminar in a month c-c-combo! I'm getting my old confidence back :D I'll try to schedule another one next next tuesday (which I will post here too) about Unit Testing~ But in the meantime, here's a few choice bits about my take on Exception Handling (Part 1 of my 3P.Net series):

Be wary of using Try..Catch Exception Handling! Its tempting to use the infamous "Try All, Catch Everything" mentality throughout your code, but that will cause a lot of trouble to you (and your team) in the future. How? Well, aside from a slight performance hit for every line in the try..catch (less than 1ms), by catching exceptions in the lower layers, you're depriving the upper layers from effectively resolving those errors!

An example: If the end user somehow bypasses the validation, and enter a null entry into a non-nullable field, the business logic layer would pass the wrong data to the service layer, who would then try to insert/update the data source. The data source would then issue an exception to the service layer (NullArgumentException). If you resolve the error at the service layer (Log the error then throw a message saying that there's something wrong) then the business logic layer will no longer catch the exception. However! If you let it 'bubble up' (eg. Don't try..catch it, or throw it again after catching it) to the business logic layer, you can now catch all NullArgumentExceptions, fill the null data with a default value, then resend it to the data source. The end user would'nt even know that an exception had happened.

Another thing, it's good practice to throw unresolved exceptions up towards the highest layer, which is commonly the Windows Forms layer (or ASP.Net/WPF/Silverlight layer, whichever the case). The top most layer however, should have a blanket try catch on its containers (form/page/usercontrol, whichever the case) in order to catch any stray unresolved errors that manage to bubble up to the very top. These unresolved errors, are the ones that we have to track with a Bug Tracker.

You can read more about this topics on my slides above, or you could just message me in my Google Profile, Facebook or Twitter. Until next time, sayonara~

Social Networking and Education

Slide Notes Here: http://ow.ly/2mmFT



It has been quite some time since I stood in front of a classroom filled with students. A week ago, Mam (Mich) Ramirez invited me to talk at Lyceum, and I immediately agreed- As you guys know, I like being an educator. But as I stood in front of the students, I suddenly felt fear and my heart started pounding fast.. I guess 'hindi na ko sanay' and I need to start performing talks more. I hope more opportunities like these present themselves..

Anyhow.

My talk was about how college education is not enough, how we must supplement it with knowledge available to us (free!) in the internet, and how to find these knowledge through the use of Social Networking. After that, I talked a bit about blogging (which, ironically, I'm blogging about right now) and which blogging platforms I think is the best. I'll reiterate a bit here:

1) I love Blogger. Absolutely free, No strings attached, moderately customizable and best of all: Allows Ads.
2) Wordpress: for Design Experts.  It requires a small yearly fee, but you can customize a lot of it afterwards: plugins, widgets, themes, etc. Also, a photoshop pro's dream photo blog.
3) Quick & Easy blogging at Tumblr & Posterous. These are free services, little customization (compared to Blogger and Wordpress, at least) but very clean and simple to use.
4) Make your own. You can set up a Joomla, Drupal or a Ruby on Rails web server at home or on a host, get a domain name to get a 100% fully customizable website that can breath fire (if you're a good enough programmer), but of course, you'd need to invest a lot of time, effort and cash to do so. I suggest trying out the free services first.

That's it for today~! If you guys have any questions (about the seminar, blogging or even programming) you can leave a message on my Google Profiles page, or just contact me through Facebook or Twitter. Until next time, Sayonara! *watches the latest Hitman Reborn*

Faith & Prosperity

What a week. First, I attended my job's care group last Thursday (10729) and the topic was about prosperity. Then. my boss gave me and one of my coworkers a ticket to a financial seminar about debt, investment and setting up a business. The seminar was today, and it went well- all three of the speakers were both emotionally moving and very knowledgeable in their topics. After the seminar, I attended the Saturday mass with another coworker, and the homily was about, take a guess: wealth. See the pattern yet?
"Owe no one anything, except to love one another..." ~ Romans 13:8
Dr. Dan Lachica's talk about debt was very inspiring, and although I'm not in debt (except maybe from my parents) I still learned a lot from it. However, what really striked me was his short segue into how cheating somehow affects what happens to you in the future. Dr. Lachica's example was that, if he holds a scalding hot bottle of water, his hand will blister right away- therefore, he immidiately knows that the cause of the blisters is the hot bottle of water. However, if he holds the hot bottle now, and gets blisters after a few days, it would be harder to connect those two events.

Now, let me tell you what happened to me just last week. Yes, a week before my whole week of faith and prosperity-talk with practically everyone.

A week ago, Saturday, I was at the office working as usual with very little care about cash except saving enough for a copy of Final Fantasy 14 come late September. One of my friends asked me if I have time after work, since a new movie that looked interesting was in the theaters (No, not Eclipse, but Sorcerer's Apprentice w/ Nicolas Cage). Since I didn't have anything planned except my weekly Saturday mass at the nearby mall, I agreed. Turns out that the same mall had a screening of the movie we want, 30 mins. right after the mass (coincidence? I didn't think so then, but...)

I met with my friend after work, and we went to the mass together. Before the mass ended, the collection basket was passed for those who'd like to share their blessings with the church- I usually pass it on because... well, I don't really have an excuse. But until then, I don't remember ever putting any of my own money into the collection basket. However, my friend took out his wallet and drew some coins when the basket neared. Feeling a bit guilty, I also looked at my wallet and got some coins out- about six or seven pesos, I'm not sure. We dropped the coins into the basket and the mass continued.

We ate at a fast food, watched the movie (it was good, btw) then went home- a bus then a jeep. Here's when I first noticed something: I had the exact amount of coins left for my ride home, and since I don't like breaking my bills to coins, I decided not to stop at a convenience store for a quick bite.

The next work day, the same thing happened at my workplace's canteen- exact change. Nothing extra to spend on luxuries that I want, but don't need. The week trudged on, and the same things kept happening, up until the weekend came- which I normally spend some extra cash (I had quite a lot, to my surprise). I had quite a fun and I enjoyed hanging out with my friends, until I noticed that I left my jacket at a coffee shop (Town Center's Coffee Bean). It was a favorite of mine, and quite new too- I immediately sms'd my mom about it just in case I never get it back, since me and my friends are already a bit far from where I left it. An hour passed by, almost two hours, before we got back. Lo and behold, I got my jacket back. The shopkeeper's staff kept it for me, and I was really grateful that they did so.

It was an amazing string of "coincidences": starting with a guilty offering of only a few pesos, into saving some cash, into finding my lost jacket, and finally capped with a series of seminars that explained everything. It took me a while before I saw which caused what effect, but I'm sure- 100% sure, that my whole week was planned by Him. I really am blessed, and I'm writing this as way to spread these blessings, to inspire, or at least convince you, that the Lord, our God, is really a generous God.

I don't really like quoting from the bible (it almost always feels like its out of context somehow), but since I started with one, I'll end with another. Until next time, Sayonara!
"As long as the earth endures, seedtime and harvest, cold and heat, summer and winter, day and night will never cease." ~ Genesis 8:22

“Are we really going to use these theories/principles at work?”

While teaching in Letran, or even while studying there a few years back, one question almost always pops up when a professor wraps up a difficult topic: “How do we apply this in the real world?” I have asked this question myself a few times, and now that I'm working in the industry again, I have this rare chance of showing you exactly how the theories are actually used in real applications. I will tag these series here as 'Theory + Reality', and the posts would be about how we can apply the theories we have learned to the software that we would create.

Reality:10716 ~ Blog 1 
Click the Pic to Enlarge!

One of the most common task that we're going to do at the industry is to maintain and improve upon existing software. Look at the code above. This is a small piece of code from the Business Logic (BL) Layer that basically shows some collection of information about the customer. According to my previous blog post about the N-Tier Architecture, the Second Tier is basically a bridge/police between the User Interface and the Data Store, transferring while verifying the data through a set of business rules/policies. Now, let' analyze the code line-by-line.

Line 174: The Business Logic code asked for a ComboBox as a parameter. The alarms in your head should already start ringing- there's something not quite right here. A Combo Box is something the user interacts with, and the bridge/police shouldn't have anything to do with it. Theoretically, what we need is the data- what's inside the ComboBox.
Line 175: It's normally unnecessary to put an entire function in a Try-Catch block. We should only catch errors that we can fix- errors that the business logic layer, or the layers below it, actually creates. Everything else should just bubble up to whoever can resolve the error. Of course, sometimes you need to do this when debugging the code, just to be sure.
Line 176 to 184: This is simply an initialization phase for the parameters that would be used by the next process. Trivia: It's almost impossible to have a runtime error here that the Business Logic layer can resolve.
Line 185: This is the connection to the Data Store. We should hold on to the data that this returns until the User Interface needs it.
Line 186: Here, we use an external object (service as clsService) to bind another external object (the ComboBox), passing the data that we got from the Data Store, which is readily available since the scope of the Set_Get_Lookup property is Public. Obviously, this doesn't belong here. It has nothing to do with any Business Logic, and has everything to do with the User Interface. Take note that one of the features of the BL layer is that we should be able to interchange different UIs easily (this design pattern is known as loose coupling) and by binding the combobox here, we are tightly coupling this part of the code to the current interface.
Line 187: Catch ex as Exception means you would catch ALL exceptions. I will say this again: It's good programming practice to just specify which errors you catch, then let everything else bubble up. The user interface usually has this kind of Try-Catch block, to notify the user that you've done everything you could've done, but the error is still there.
Line 188: This is an impossible line of code. Business Logic layers are normally compiled in a library (a DLL) and libraries, by their very nature, are “headless”. They should never have a User Interface, so calling a MessageBox here is a logical error.

Theory + Reality
10716 ~ Blog 2 
Click the Pic to Enlarge!

You can see in the sanitized and Diff'd code above the design patterns and theories which I applied. Specifically:

Single Responsibility Principle. The business logic layer should have one, definite responsibility only: to act as a bridge/police for the data traveling between the UI and the Data Store. Don't let responsibilities bleed into other layers, or even other objects (also: avoid tight coupling).
Load Once, Use Many Principle. You can find my blog post about the Lazy Initialization design pattern here.
• Better Exception Handling.

That's it! The first of the hopefully many posts in this series is complete, and I hope we've both learned a lot from these. Until the next post, sayonara :D

Post@Posterous? Or Not?



I have been reading Michael Scott's novel, The Alchemyst this last few weeks, and it inspired me to write a short story in the same vein- about teens using magic in the modern world. Aside from posting it in my DeviantArt account, I have also decided to post it in a new blog which has far more editing capabilities. Posterous.com has been making waves in the internet world this past few weeks due to their new features, and I decided to give the service a try.

First things first: The signup was mixed bag. On one hand, all you have to do is email your first post to post@posterous.com and you're automagically signed up. On the other, geeks and experienced bloggers usually set the site up before posting- and it took me a couple of seconds to figure out that the sign up form was on the login page, and not the front page. After that's done though, Posterous accepts OpenId which makes logging in a breeze.

After playing with it for a while, I realized that the site is a far, far cry from Wordpress, or even Blogger. While most Blogging platforms have focused on ever-expanding features, Posterous have focused on Simplicity (a bit like google). They sticked with a simple WYSIWYG interface for posting & editing- there's nothing new in post-by-email, and their autopost to social networks is subpar with what Wordpress offers- for example, you can't choose which link shortener you can use. Also, the initial Themes, while very customizable, are limited to about a dozen.

If the only service you need is a place to put your notes, thoughts or stories into, then you can't get any more simpler than what Posterous offers. Signup, then everything's ready to go- post away!

Note: Sorry I can't post more often and more concise. I don't have Internet Access at work (yet) so I don't have the same amount of resources as before~ I'll still try my best though, gambatte! w00t~

Two-Tier Or Three-Tier?


N by !Raimyu on deviantART

The N-Tier pattern, when used in software development, is one step above my usual topic of design patterns. They are commonly called architectural patterns which are concerned with the software at a macro level (eg. ‘the big picture’).

Some time ago, I was tasked before of maintaining a line-of-business sales system from a fairly large company.Their technical design spec was quite clear that the “…architecture is divided into three (3) main layers…” which, in theory, should make my job easier. As I browsed through the code though, one thing became apparent: It was not a 3-Tier Arch like the docs said, but a more traditional server-client setup~ Now, what is the difference exactly?

A Server-Client architecture (which is, technically, a 2-Tier Arch) is concerned primarily with the centralization of data and sometimes the balancing of process load to either the server or the client. The data and the business rules (stored procs) are stored at the server, with a thin client app to present the results (forms, grids & reports)- which is exactly how the LoB app above works.

S+C’s Advantages over 3-Tier Arch

  • Faster Development (less design, less code)
  • Can offload processes to the server to accommodate for weaker client workstations, or vice versa if the server is the performance bottleneck
  • Can change business logic without re-deploying new software to the user

Three-tier applications on the other hand, is focused on the separation of responsibility to facilitate control and change. The Data Access Layer is usually separated physically such as a Database Server, but is mostly kept “dumb” except for very few performance functions. The Business Logic Layer on the other hand is a more robust collection of libraries and maybe a few dynamic scripts that enforces the rules of the application. This ranges from who can access which data, data validation, up to caching, etc. Lastly, the topmost Presentation Layer is the combination of UI Rendering (Windows Forms, ASP.Net, WPF, etc.) and UI Logic (Parallel processes, Sessions, States, anything that is not business-related logic).

3-Tier’s Advantages over S+C Arch:

  • Modular, and thus easier to maintain. You can replace one layer with another completely with very minimal code changes (switch from Windows Forms to WPF or ASP.Net with zero impact on business logic or database schema)
  • can perform Unit Testing very easily. Since all of the business logic is contained on libraries, you can hook the DLLs easily on a controlled testing environment.

We have to consider both sets of factors above in order to decide which architecture to use when designing our software~

Job @ Honda/Isuzu

At exactly 8:00am GMT+8 tomorrow (10619), I’ll officially be an employee of Ayala Motors under their Honda/Isuzu team :D It’s nice to have a permanent job instead of just jumping around with freelance and open-source development stuff~

Fun Facts: I was without a permanent job for approximately…

  • 2 Months and 6 Days or
  • 9 Weeks (rounded down) or
  • 67 Days or
  • 1,608 Hours or
  • 96,480 Minutes or
  • 5,788,800 Seconds o.0;

Of course I will still try to contribute to the Open Community, but in the meantime (at least while I’m still on probationary status) I will probably limit my posts here. I still have a lot to talk about, in fact: I have a post about the Difference between CS and the IT courses and another post about Careers and How to Make/Break one. I will post both of them ASAP, but I guess its sayonara for now~ See ya :P

Hadou 91: Senjyu Kouten Taihou

Hadou91

Limit of the thousand hands
Respectful hand, unable to touch the darkness
Shooting hand, unable to reflect the blue sky

The road that basks in light
The wind that ignites the embers
Time that gathers when both are together
There is no need to be hesitant, Obey my order

Light bullet -
Eight bodies -
Nine items -
Book of heavens -
Diseased treasure -
Great wheel -
Grey fortress tower

Aim far away,
Scatter brightly and cleanly when fired

Thousand Hands Bright Sky Cannon

~Urahara Kisuke, Bleach 402

Motivation

Motivation is the fuel for your creative engine, so that you can reach your goals. Intelligence and creativity matters little if you are not motivated enough to use these gifts. Actually, some people argue that motivation is the root of being smart or creative.

However, not all motivation are the same. Being a Computer Science or Information Technology student, the rewards matter a lot. In fact, as the video below demonstrates, carrots and sticks (the traditional “more work == more reward” paradigm) have the opposite effect on tasks that require the algorithmic approach.

According to studies performed by world-class economists from M.I.T. & Carnegie Mellon: For simple, straight-forward tasks, the traditional “do this == get this” paradigm offers enough motivation. But for more complicated tasks that requires conceptual or creative thinking (eg. programming or information analysis), the traditional motivators does NOT work.

If this is true, then what drives us? Autonomy & Mastery

Autonomy is the desire to be self-directed. This is why programmers tend to clash with the management the most- because we are innovators, risk-takers, explorers, and most importantly: Scientists. We boldly go where no man has gone before.

Mastery is the urge to get better at stuff. The best musicians in the world play music for fun. Not for cash, not for fame. Just because its fun. Programming is the same- we want to be better programmers because we enjoy programming, and being better at it is immensely satisfying.hubble10-hp[1]

Look at Google’s Innovation Time Off: Engineers are encouraged to spend one day of their week to work on projects that interest them. The engineers decide (autonomy) to work on interesting projects (mastery). And from this model, a lot world class services emerged: GMail, Google News, Orkut, even Google’s primary revenue source: AdSense. Now THAT is how you motivate programmers.

Teaching Starcraft 2

Sometimes, we need to take a break. Enough programming, enough study, and just relax. But that doesn’t mean we can’t learn anything while relaxing :D StarCraft II: Wings of Liberty is a military science fiction real-time strategy video game currently under development by Blizzard Entertainment as a sequel to the award-winning 1998 video game StarCraft.

I am, and always have been, a Zerg player (“sspawn more overlordss”), and today’s little video will teach you some of the basics on playing starcraft 2, specifically a tactical play known as “Seven Pool” as well as some of the terms used in-game.

Btw, turn on the annotations ^^ So, a bit of a primer about the terms used in SC2:

  1. X unit/building – This means that when you get to population X, build the unit or building eg. 7 Pool (build a spawning pool at 7 pop.) or 12 Rax (build a Barracks at 12 pop.)
  2. Micro – Shorthand for ‘Micromanagement’, or selecting unit(s) and giving individual commands on each. This ranges from normal (Stalker blink, Zergling surround, Reaper evasion) to extreme (getting 3 harvesters on each resource)
  3. Macro – Shorthand for “Macromanagement”. To most players, ‘macro-ing’ means getting the most resources out of multiple bases ex. Getting an early expansion is a Macro move, or ensuring that each of your bases are saturated with just-enough harvesters.
  4. Tech, or Teching – Means getting upgrades, normally to get a certain unit eg. Teching to Hydras means getting gas and lair.

Ok, to recap, Zerg 7 Pool goes like this:

  • Game starts with 6/10 Population
  • 6 Drone
  • 7 Pool
  • 6 Queen (I made Lord+Drone here instead.. my mistake)
  • 8 Gas (Didn’t have to do this since I have an extra Lord)
  • 7,8,9 Lings
  • Attack
  • Profit!

I didn’t really follow the optimal build for 7 pool, and my micro needs more work. But you get the general idea~! :P This works great vs Terran or Protoss, but not against zerg since there’s normally an early Queen (on most builds) which can delay your lings enough for them to recover.

So, I guess that’s it~ I’m planning to create a new blog where we’ll post our ramblings w/ Starcraft 2, and yes, I said we. Guess who’s with me on this one? ^^ Until then, sayonara~

A look inside Letran: Teaching Programming Part 3/3

I totally agree with Jeff Jarvis’ points in the above video. Education today is a 19th century system struggling to cope in a 21st century world- it’s like using a steam engine to commute to work today. It has become apparent to me, that in Letran’s walls, teachers “stamp out students all the same way with only one right answer each… And so, that assumes that all the knowledge flows from the [lecturer], if you don’t feed it back, you’re wrong- you fail.” Its a system that kills the students drive to explore, to argue.

Inside the classrooms, discussions are always one sided- why would Letranites ask questions? Why would they argue? Not only is there zero incentive to do so, but I think arguing with the professor has been indirectly forbidden. How? Peer pressure can be a problem, or a teacher might have embarrassed someone asking a stupid question. Maybe the curriculum does not stimulate a students brain enough for them to ask any questions. In my opinion, more interaction is needed- we are training computer scientists here, and like the scientists of other fields they need to discuss and argue and experiment in order to challenge the norms and discover new things, eg. non-routine problem solving.

If you can compare side by side the curriculum of Letran (or even the other Universities in the Philippines) and MIT’s OpenCourseWare, Academic Earth, or even Youtube EDU, you’ll begin to see another problem. On all of the courses offered, their online equivalents are almost always better. Its more interactive, up to date and free. You can learn more online in a weeks worth of videos, than spending four years in a Philippine university.

As Jeff above said, the good stuff are already out there. We have to stop this culture, of standardized testing and standardized teaching.

PS. More good points from the video: Quizzes and Exams @8:46, Google did not spring from the lectern @10:45, We have to stop this culture… @12:30

C#4.0 & The Decorator Pattern

The decorator pattern can be used to make it possible to extend (decorate) the functionality of a certain object at runtime, independently of other instances of the same class, provided some groundwork is done at design time. (http://en.wikipedia.org/wiki/decorator_pattern)

Design Pattern: Decorator Patten
Pattern Type: Structural
First Stated in: Code Complete, Steve McConnell (1st Edition)
Description: Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality.

One of the features of C# 4.0 is the dynamic keyword. Basically used like the var keyword, a dynamic object defers type-checking until runtime. A simple example:

static void Main(string[] args)
{
dynamic pet;

pet = new dog();
Console.WriteLine(pet.kick());

pet = new cat();
Console.WriteLine(pet.kick());

pet = new lion();
Console.WriteLine(pet.kick());

Console.ReadKey();
}

class dog { public string kick() { return "ROWRrr!"; } }
class cat { public string kick() { return "MEOWRrr!"; } }
class lion { public string kick() { return "OmNomNom-"; } }

Make no mistake, that is still fundamentally C#, with all the static type-checking done in the background (mostly in runtime). Anyway, we can also use the dynamic keyword to implement the decorator pattern- which extends a function of a class.

class Program
{
class Zergling { public float cost() { return 1; } }
class BanelingMorph
{
dynamic zergling { get; private set; }
BanelingMorph(dynamic z) { zergling = z; }
float cost() { return zergling.cost() + 0.5f; }
}
class AdrenalGlands
{
dynamic zergling { get; private set; }
AdrenalGlands(dynamic z) { zergling = z; }
float cost() { return zergling.cost() + 0.7f; }
}
class MetabolicBoost
{
dynamic zergling { get; private set; }
MetabolicBoost(dynamic z) { zergling = z; }
float cost() { return zergling.cost() + 0.2f; }
}

static void Main(string[] args)
{
dynamic DevoursChildren = new Zergling();
DevoursChildren = new BanelingMorph(DevoursChildren);
DevoursChildren = new AdrenalGlands(DevoursChildren);
DevoursChildren = new MetabolicBoost(DevoursChildren);

Console.WriteLine(DevoursChildren.cost());
Console.ReadKey();
}
}

I'm doing this while alt-tabbing between Starcraft2 Beta, so forgive the old zergling hero cameo ^^; Anyway, Decorators work a lot like Object "Upgrades", in a sense that they can change the resulting object by modifying functionality. I guess that's done~ Until the next design pattern, Sayonara XD

Need Net? IMMORTALSURF20

ImmortaSurf-Promo

For only 20Php: Internet on your phone?! No Expiry?! Too good to be true, or is this total BS? IMMORTALSURF20 service review below~

Last May 6, 2010 Globe Telecoms Philippines announced a new IMMORTAL service called Immortal Surf 20. For only 20Php, you’ll have 1 hour’s worth of “data calls” aka internet connection, and just like the other Immortal services (Immortal Text & Immortal Call), it will not expire and consecutive uses will stack.

A few drawbacks though: 1) Not fast. Not too slow either though, but don’t expect to break 100kbit/s [Note: standard desktop DSL is 500 to 1mbit/s] 2) A maintaining balance of 5Php, not a big deal and 3) Minimum use of 1min- which means your usage is always rounded up to the next minute eg. 1min and 2sec data call = 2 min. Understandable, given the price of 20php :D

Now before you try the service out, make sure that your phone is properly configured first:

  1. Check if your phone has a web browser. If it does, I highly recommend going to Opera and get their browser- it will compensate for the slow internet speed.
  2. Set up myGlobe GPRS. This may vary from phone to phone, but for the tech savvy:
    • APN: www.globe.com.ph
    • Internet Mode: HTTP
    • Use Proxy: Yes
    • Proxy Address: 203.177.042.214
    • Proxy Port: 8080
  3. You’re all set, so just text IMMORTALSURF20 and send to 8888 [note: All caps, one word]. After a while, it will reply and you’ll have internet access!
  4. If you want to check your remaining data allowance, just text IMMORTALSURF STATUS and send to 8888.

Aside from the hassle of setting up your phone to receive GPRS, I’m finding the speed acceptable and the data connection is stable (so far). I like the service, not to mention that IMMORTALSURF extends the Internet to more Filipinos. Enjoy the mobile Internet~! ^^

PS: The promo pic above is photoshopped (by yours truly)~ Globe wouldn’t use a Windows Phone 7 in their ads.

A look inside Letran: Teaching Programming Part 2/3

“Institutional Education needs to do more than just adopt a few new tools.“ ~ Dan Brown (http://twitter.com/DBUniverse)

A few meetings went by, and I was getting the hang of speaking in front of the class. It was terrifying at first, but my fear was soon replaced by the thrill that my students are actually learning something. It was an awesome experience to watch the freshmen’s eyes light up as they discover the concepts and algorithms to solve the problems. Granted, the language should have been easier so that more than just the logically-inclined students can pass the laboratory exams, but aside from that- all of us are learning.

The midterm period passes without a hitch, but soon I find myself questioning (again) the methods that I use to teach the concepts at lecture. I noticed that more than half of my students are very unmotivated to learn. They’d rather focus on some of their minor subjects- Art App, Communication, and later, Physical Ed. I wondered why..?

Interaction.

The students craved interaction. They needed to interact and experience the facts (in our case, concepts & algorithms) in order to learn them effectively. They want to understand the concepts, not memorize what they mean. Just telling them to memorize what iterations mean is plain stupid- because that information is free, online. This is what they liked about the minor subjects: you don’t have to memorize anything, you just have to do it.

The video above by Dan Brown (not the author, mind you) nailed it: Education is not about facts- Its about empowering students to change the world for the better.

Specs (Both kinds)

Specifications (noun, plural)

1. A set of requirements defining an exact description of an object or a process.
2. In computer programming, a Design Pattern where business logic can be recombined by chaining the business logic together using Boolean logic.

Part of almost every development life cycle is the design stage. This is where you determine the requirements of the application, if its feasible, and if so: a) how to implement it and b) how to test if the implementation works. An analogy: If an application is a house, one of the first things to determine is the number of rooms & floors, which materials to use, etc. Specifications are the documents that is produced after the design stage, which is basically the blueprint of the house.

Many programmers skip the design stage, opting to code directly. Big Mistake. That’s like building a house without any documents: no blueprint, no materials manifest, etc. Sure, it might work but only after a lot of trial and error (basically, the failed apps becomes your documents). And even if it does work, who in their right minds would live in that house? Without specs, its hard to test if works or not.

The specifications design patter, on the other hand, is quite different. Sometimes, business logic objects can be “chained” together like so:

ISpecification CardsToPrint = Red.And(Even.Not()).And(Facecard); 
ISpecification CardsToPrint = Even.And(Red.Not()).Or(Facecard); 
ISpecification CardsToPrint = Facecard.Or(Even.Not());
Design Pattern: Specification Patten
Pattern Type: Behavioral
First Stated in: http://www.martinfowler.com/apsupp/spec.pdf
Description: Recombinable business logic in a boolean fashion

My sample app uses a standard deck cards, then uses the Specification pattern to specify which cards to print. Of course, one can easily substitute “Employees” or “Places” with the collection of cards. Feel free to experiment with the CardsToPrint variable: to check the results quicker, comment out the shuffle method.

Source Files (in C# 4.0): SpecificationsPatternExample_Source.zip

Specifications: A couple of important computer science topics that has the same name but different meanings~

The name's Zetta, and I'm gonna Overlord your faces off!

Try Twitter’s Embeddable Tweets~ Instead of posting a screenshot of your status update, go to http://media.twitter.com/blackbird-pie/ and paste the url of your tweet there then click ‘bake it’ to create a huge chunk of embed code. Result:


Pros:
• The Links are LIVE~!
• Twitter’s background is retained (which IS a part of your twitter identity, believe it or not. People recognize these~)

Cons:
• BIG Chunk of embed code.
• Timestamp not live :(

Anyway, love it or hate it- It nice to know that the twitter service is moving along and not stagnating (google buzz) or killing itself (facebook)

A look inside Letran: Teaching Programming Part 1/3

“Do what you do best and link to the rest” ~ Jeff Jarvis (http://www.buzzmachine.com/)

I am an educator. Once, I lived a life of teaching and evaluating, and it was a journey I would never forget. I still am.. but my year on Letran was very fun & very informative- and I’d like to share with you a summarized version of my short roller-coaster ride there. With videos =D

When it was confirmed that I’m going to teach Introduction to Programming (Fundamentals of Programming, for the non-Letranites out there) to the first year students, the first thing I did was to look for other lectures. I knew that someone, somewhere, there is a great professor teaching the same subject, and I was hoping he recorded it.

Watch it on Academic Earth

Prof. David J. Malan from Harvard University, is the star I decided to shoot for (The entire series can be watched on Academic Earth). At least if I failed, I’d land on the moon. But as I was teaching, I realized that Letran’s methods and Harvard’s are not the same. I asked myself, should I teach Python to this kids, considering that their next subject is C++? My co-teachers told me that the disconnect might hurt the students- and relying on their better judgment, I revised my plan and taught C instead.

In hindsight, I think I should have stood my ground. I should have pushed against teaching C, because the language is, fundamentally, a low-level language (just a step above assembly). It is primarily used for close-to-the-metal applications where performance is a priority. A 1st year professor shouldn’t care if the program takes 1 minute slower, coz as long as it runs, then the student understood the concept/algorithm. Teaching an easier language, something more like natural language (english-like) would make the freshmen understand stuff better. Python is perfectly good example of this, but there are languages actually designed for this, such as SmallBasic.

Another thing: If the students know C, then you start teaching them C++, then they might mix them up. They might accidentally use C-only syntax or a C library instead of the C++ counterpart. Would it help if they know some of syntax beforehand? Maybe. Would it hinder them? Maybe. In my opinion, it’s a 50-50 deal, gambling that C would help the students learn C++.

Why not just teach them something easier but still introduces the same concepts & algorithms?

App Idea: The Interface

I was reading Scott Westerfeld’s Bogus to Bubbly, a companion to his Uglies Series, yesterday, and I loved the reputation system he used in the fourth book, Extras. I wondered… what would happen if everyone who’s publishing in the internet had a face rank? If the awesome “layer” system is implemented over these feeds, and every individual has one.

The more I think about it, the more everything clicked into place. Everyone (almost) does have a feed in the web, but the problem is there’s no central repository of feeds. Facebook, Twitter, Blogs, Flickr, Picasa… all of these are feeds- and I think the solution is Google Buzz. You can connect everything to buzz and it will aggregate all your data into a single, personal feed.

Optionally, you can kick a feed item (yours or not) by adding some text (not less than 50 words, or else it will just become a comment) or some media (pics or video)  into it. This will become a Foreground layer (mentioned by Ren Machino in Extras) and if other people has also kicked the same feed item (determined by URL), then those will become the background layer (sorted by facerank, of course).

But how would you compute the Faceranks? Every time someone clicks anything from your feed (a link, a story, a comment, whatever), it counts towards your face rank. The feed clicks expire and after 3 days though, because news gets old (kicked story clicks expire after 7 days). Also, only the clicks from your first 50 feed items count, plus your first 50 kicked stories- this means you can’t just go crazy with your feed because it will push down the news with clicks, but you can’t stop posting when you’re at the top, because your famous stories will start expiring clicks.

And what better platform to deploy the app than on a mobile phone? (Until eyescreen technology becomes viable, at least)

10503-~-The-Interface

Internet + FaceRanks = The Interface. I wish I had the time to code this up :(

Windows Phone 7 (w/ Video)

I just received an email about the Windows Phone 7 Developer tools being available ‘immediately’ this morning, so I went through their site to find it. The email didn't contain the link to the download page, and I can’t find any direct downloads, so I was forced to get the web installer version here.

*after a few hours*

Here are my thoughts:

+ Teh Interwebz is enabled by default :D Woot~!
+ XNA/Silverlight views & C# models means that code can be easily reused/ported to Windows Phone 7
+ The default resources are included in the app.xaml including the textblock, font, button and slider styles.

• The Emulator was fast and snappy (after a long startup load) but will the apps run this fast on real hardware?

- NOT Silverlight 4, which means that there’s no ICommand interface. You can see the commonly used workaround on the video above.
- I forgot to show this on the vid, but I can’t multitask. When I click the back button (black arrow near the windows ‘start’ button) the current application exits.. maybe I’m doing something wrong?

All in all, I love it when a new platform comes out and I can use my existing knowledge to code apps there immediately~ :D

Singletons

I was experimenting with C# 4.0’s parallel functions (specifically parallel.foreach) and I had problems with a database-file sharing permission exception last night. What’s funny is, that’s supposed to be impossible. The Database Server object was a singleton, which meant that you cannot instantiate more than one instance of the class.
Design Pattern: Singleton
Pattern Type: Creational
First Stated in: http://en.wikipedia.org/wiki/Design_Patterns_(book)
Description: Ensure a class has only one instance, and provide a global point of access to it.

I started with this code:
public static DataManager Instance 
{
get; private set;
}
static DataManager()
{
Instance = new DataManager();
}
private DataManager() { }

Fairy standard. Line 1 exposed the instance, lines 5-8 is an internal lazy initialization, and the last line prevented the consumer from initializing the class themselves. Can you guess how the program managed to get around this limitation? It turns out that my application is a bit too fast. I mentioned earlier that I used Parallel.ForEach to access the object: this means that every cycle of the for loop is done in parallel of each other. If I had at least two objects inside the ForEach, and there’s enough CPU and RAM remaining, they would both run at the same time- initializing the object twice.

Poking around the web for solutions, I found one that used a double-locking algorithm which (guess what?) locked the instance from other parallel threads.
private static volatile DataManager _Instance;
private static object syncLock = new object();

public static DataManager Instance
{
get
{
if (_Instance == null)
{
lock (syncLock)
{
if (_Instance == null)
_Instance = new DataManager();
}
}
return _Instance;
}
}

private DataManager() { }

Line-by-line: The first line uses a keyword that I haven’t seen since college: volatile. The keyword locks the the _Instance field until it is initialized and fully accessible. Next line (2) is a dummy field of type: object which we see again on line 10- basically, we’re avoiding a deadlock by making the object always accessible, which is only possible if we don't lock the type itself (DataManager) down. The other lines are self-explanatory: A lazy initialization and a constructor that blocks the consumer from initializing more objects.

I compiled the app and it looks like everything works as expected for now :) Until the next bug, ciao~!

Reformat

I’m planning to reformat my PC in a month or so (yes, I plan that far into the future) and I was collating the programs that I need to reinstall immediately. So far, Here’s the current list (In order of installation):

  1. Microsoft Windows 7 Ultimate x64
  2. Microsoft Security Essentials
  3. Google Chrome
  4. Update EVERYTHING (Security Updates, Drivers, Virus Definitions, etc.)
    • Install Microsoft Live Suite (Writer, Movie Maker, etc.)
  5. Microsoft Office 2010 Professional Plus
  6. Microsoft Visual C# 2010 Express
  7. Microsoft Visual Web Developer 2010 Express
  8. Microsoft Live Mesh
  9. Microsoft Fixit Center
  10. TortoiseSVN
  11. Adobe Acrobat Reader
  12. CutePdf
  13. Adobe Photoshop CS5
  14. Apple iTunes
  15. SPlayer
  16. BitTorrent
  17. 7-Zip
  18. Notepad++
  19. Orbit Downloader
  20. Wizards of the Coast Character Builder
  21. Masterplan

That’s it. I don’t think I missed anything.. well, I guess except the games stuff (Magic Workstation, Mass Effect 2, Dragon Age: Origins and PCSX2) =3

Favorite Author

I was trying out http://www.youtube.com/user/SearchStories and tried to create an online video-résumé that showcases my online presence- until I found out that i had none :( So instead, I change all of my names into my favorite author, tweaked it out a bit, and here’s the end result~! Enjoy :D

The quality sux though.. I hope they do something about it.. the original google search story looked so clean and high def~

Lazy ain’t Always Bad…

You can fire up Microsoft Word, type something up quick, save (and/or publish) then close the app down, in a couple of minutes. Only the relatively quick splash screen would force you to wait as the program loads before you can start writing.

As a developer, you should (as a rule) make your software as quick as possible, and one of the more popular tactics to do this is by delaying to load an object until you actually need it. You can see this approach in Microsoft Word: Behind the splash screen, the app loads only the necessary UI (the document view, the ribbon, etc.) and after everything’s good, shows it the user. Since the user doesn’t always need, say, the font dialog box, then it isn’t initially loaded. A click in the right button however, would load the form on the fly and show it to the user. This concept is called Lazy Initialization.

Design Pattern: Lazy Initialization
Pattern Type: Creational
First Stated in: Patterns of Enterprise Application Architecture
Description: Lazy Initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed
    public class DataManager
{
private Server _ServerOne = null;
public Server ServerOne
{
get
{
if (_ServerOne == null)
this._ServerOne = new Server();
return this._ServerOne;
}
}
}

As you can see from the code above, first it checks if the object has already been initialized. If it is, then it hands over the already live object, but if not- then it initializes the object on the fly before handing it over. This means that the second time the object is needed, it would be quicker since you don’t have to initialize it again.

Now, before I hit publish on this post, I just want to say that the topic is not, in any way, connected to why there wasn’t a blog post yesterday =P I'll try to get two posts up today to make up for it~

Abstract Factories

I was designing an application’s Data Access Layer when I realized that the Objects that needed to be persisted can rapidly grow. This meant that I can’t use Binary or XML Serialization due to memory limits, but I can’t use a full relational database either since some of the objects needed to be stored in the memory for quick access. So my only options are memcached key-value database, a combination of relational (for long term data) and Binary/XML serialization (for short term data) or use Db4o plus a clever design pattern called “Abstract Factories”. Of course I went with the simplest path (for me, at least).

Problem: You need to persist (save to storage) a number of related objects.

Solution: You can use Abstract Factory pattern in conjunction with Db4o.

AbstractFactoryPatternExample

Design Pattern: Abstract Factory pattern
Pattern Type: Creational
First Stated in: http://en.wikipedia.org/wiki/Design_Patterns_(book)
Description: the abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme (eg. related to each other)

First, I encapsulated all of the Db4o stuff in the Abstract Classes. The abstract server factory act as the databases while the abstract client products are basically tables, or the enumerations of the abstract data. Now, why are all of them abstractions? So that when there’s a new database, you only need to inherit the ServerFactory and it automagically works~! Same goes for the other abstractions. In fact, you can add properties to the concrete data objects (eg. add quantity to OrangeData and/or price to GrapeData) and all of it would be persisted!

As you can see in the attached C# Console solution below, the actual business logic are totally oblivious to the Db40 stuff going on in the background, while all of the Server/Client/Data objects just inherited the Data Access Layer classes in the AbstractFactory+Db4o library. Tinker with the app, add properties to the Data, add more servers/clients and see how powerful this combination of technologies really are.AbstractFactoryPatternExample_Source2

Download Source Here: http://ow.ly/1zHeI
Download Release Here: http://ow.ly/1zHgv

Preface

This is the unedited, word-for-word Preface of my upcoming book “Fundamentals in Programming”. Also, all of this is true.

I was in my third year of high school when I first got my Playstation 1.

After obsessing for over a year about Final Fantasy and Metal Gear Solid, my dreams finally came true on my birthday that year. I cannot sleep the night before, and will not sleep the night after (Do not do this at home, kids.) The next year became a blur: I played a lot of role-playing games and strategy games, from Final Fantasy Tactics to Legend of Legaia to Valkyrie Profile. My grades did not suffer much- being a high school student, there weren't any challenging subjects, and my social life… well, I'm not exactly a people person. I have my gamer friends, and they are enough.

However, one game really got my interest: Final Fantasy 7. I obsessed over it for so long that the system timer of the game became red and got stuck on 99:99:99. My friends and I discussed for hours about which optimal characters, equipment and materia combinations to use, the side quests and unlockables, ways to solve the game differently, and so on. However, almost every argument came down to one rumor: How to make the heroine survive.

In the game, Aeris, the heroine, will die in the hands of Sephiroth, the main antagonist. However, several sites and forums in the internet hinted that there is a way to avoid it. That became our quest: our mission, THE mission, of my small group of friends. We scoured the web for information, big or small, about the said rumor. We posted in forums, we asked the chatrooms, we emailed everyone (even the creators of the game) to know more. We tried everything: opening specific treasure boxes, collecting specific items (in a specific order), going through the game with only one character, as fast as possible, etc., etc…

After I finished college, I realized: THIS is exactly what Programmers do.

No, not obsess over games. Programmers gather information, both right and wrong. We analyze the information, looking for clues and solutions. Then, after that, we will try every possible angle to solve the problem, and finish our mission. No matter how many dead ends, no matter what the odds are, or what manner of Sephiroth-of-an-algorithm you are facing, you will TRY everything to save Aeris.

In the end, we found out that it is impossible to stop Sephiroth from killing Aeris. Nevertheless, the journey to that conclusion was awfully fun, and well worth playing for 99:99:99 XD

Research Proposal, Part Deux

I was at a loss on what to describe at the "Scope and Structure" part of my research proposal, so I decided to skip and create my tentative table of contents and start from there.

After I composed the ToC (attached below), I immidiately realized that the book is a bit too complex. The beginning chapters was alright, but it progressed a bit too fast and finished with a couple of modules that the students wouldn't use until their undergraduate thesis (or in the industry, in the case of team programming). I thought about compressing it further, giving more breathing room in the first few modules, but then realized that I'm not writing the book just for the freshmen (first year students). If a student buys my book, then they'll use it until their last year in the colegio just because of multiple perspectives it presents to the reader.

So, the first draft of the proposal for my book "Fundamentals in Programming" looks like this:



I still have to iron out a few things before I pass it tomorrow, but I doubt it would be changed that much. Wish me luck, I hope this gets approved ^^ tommorow then~

Laid off

*sigh*

Just two days after I start this blog.. I am now officially unemployed. Tsk~

Well, I'll still continue my ongoing projects (even though I will no longer be paid for them now) and I'm hoping that I can find a better job in the future..

For my students, the teachers of the Colegio, and everyone from my life as a professor~ Sayonara =3 I will miss you.

Research Proposal, Part One

I’m currently typing up the research proposal for my book, “Fundamentals in Programming”. It’s fairly long (and boring), but I plan to post most of the juicy parts in this blog.

 

The first part of the proposal is the name of the worktext, and the name of the proponents. Unfortunately, I’m not the sole proponent of the book because I’m not yet a regular employee of the Colegio. Dr. Cory Rebong, however, is my boss (Institution Head) and agreed that she’ll be a proponent “in paper only” and left the whole project to me :D

 

The review of literature was focused on the lack of problem solving skills of freshmen students, as well as their difficulty in understanding abstract concepts such as Variables and Memory Addresses. My proposed solution to this problem is a brute force approach- from start to finish, all examples will be problem-solving. Also, the entire first chapter of the book is dedicated to modeling abstract concepts through the use of pseudocode and flowcharting.

 

I spent a great deal of time researching the literature for the proposal, and found that the book: Information and Beyond: Part I By Eli Cohen (the famous Book of Eli, yea?) contained a wealth of research, specifically I. Milizweska and G. Tan’s work (pg. 277) which they entitled “Befriending Computer Programming”. I also found that one of their references, E. Dunican’s Alternative Delivery Techniques for 1st Year Programming Courses, is very informative.

 

The needs analysis was straightforward, with a focus on the shortcomings of current programming books in the Colegio’s library. Most of the books are outdated with only one or two copies on the shelves.

 

I’ll discuss the proposed Scope & Structure of the book on part two~ I guess my self imposed 300-word limit is a bit too short :( Anyhow, see you tommorow, Oyasumi~!

Ohayo Gozaimasu!

No, I am not Japanese. But I am a teacher.

 

Welcome to my blog! I am Erik Gaius Capistrano, more known as Sir Erik, an IT/CS Professor of Colegio de San Juan de Letran – Calamba. Aside from teaching future programmers, I’m also an application developer specializing in .Net Technologies and Design Patterns.

 

Since this blog is supposed to be my professional blog, expect it to be filled mostly with topics concerning application development and teaching at the Colegio. I’ll occasionally post something personal, but if you really want to know about me, then I suggest you follow me on twitter.

 

Right now, I’ve got a LOT of free time since its summer vacation- however, I’m planning to write a book for the first semester and document the process here. Also, I have a pretty big side-project which I’ll reveal here soon (spoiler: It’s open source!) ^^

 

I guess that’s everything for my first post, I’m looking forward to writing and blogging again! Until next time, Oyasuminasai!