December 21, 2012

Admiration : Instagram

Importance of Networking

“Who’s, like, the smartest person I know who I can call up?” Mr. Systrom remembered thinking. ...a former chief technology officer at Facebook ... Mr. D’Angelo became Instagram’s lifeline.       

Mr. D’Angelo, a 2006 graduate of the California Institute of Technology, helped him find engineers, set up databases and flesh out features.

...

Instagram took off like a rocket, in part because Mr. Systrom had whipped up demand. ... Mr. Systrom let some influential technology bloggers and contacts, like Mr. Dorsey of Twitter, try a test version of the app before its official release.

One Billion in Two Years

How Instagram founder Kevin Systrom became insta-rich

Insta-Techno Stack

  1. Keep it very simple
  2. Don’t re-invent the wheel
  3. Go with proven and solid technologies when you can

Choosing Technologies for Your Web Startup




All very cool readings.

Two Free Tuition Classes for Raffles Institution Students

Most of Raffles Institution Students cannot be cool. Goh Zuo Min said in Oct 23, 2012, today paper:


"Students usually keep their notes to themselves, and even tell schoolmates the wrong things to study..."


Thus, my Free tuition classes for all JC students:
  1. Kindness for Non_rivals
  2. Kindness for Rivals
The first class is easier and higher than the second. If you pass the first, the second is not necessary for you. (This course design betrays my 3000-plus years of age.)

Kindness for Non_rivals


We need to define rivals very specifically. That is, very narrowly. How narrow? How about Sein Baydar, a pre-war famous Myanmar musician?


"Today's Sein Baydar is competiting with yesterday's Sein Baydar..."


All 3000-plus-years old people know that Kaizen/continuous improvement was  not invented either in Myanmar or Japan.

So, who are your rivals, Raffles Institution Students?

Kindness for Rivals


If you still have rivals other than yourself, you need to take this second class. Here I teach self-cannibalization.Again, all 3000-plus-years old people know that it was not invented by Tom Peters, or any other American management gurus.

When I was in high school or Uni, I passed around notes to anyone interested. Those notes were my current best. But they were getting obsolete in a few days' time because I kept working on them.

Can't you let others score good marks while you can score excellent marks?

Even with the same notes, cannot you rely on your intuition, your native wit to give you brainwaves during the exam? When will you train your intuition if not when in schools?

Even with the same notes, cannot you rely on your luck?  All 3000-plus-years old people know that all good people are lucky.
Uncle is sad. Uncle can share a lot with you about good competition. Good luck!

Competitiveness | Jose Mourinho

The two teams involved were Barcelona and Inter Milan. But the coach of Inter Milan was so famous that he overshadowed all the players and even the teams themselves. Thus, many newspapers and online commentators described the match as "Jose Mourinho vs Barcelona."

It was a battle royale between a special manager and a special team and the special manager won out 3 to 1. My curiosity was piqued to see how an individual can have that much impact on so many players. This is my analysis of what exactly happened.

Mourinho understood football/soccer as a position-and-numbers game. Barcelona and other teams take it to be a possession game. Thus, they are playing different games in fact. Most other teams want to feel like over-capitalized startups: the more money, the better. The longer you keep the ball, the better. However, the truth is borrowing more than you need does never good, and similarly, just keeping the ball for the sake of keeping it does no good. Mourinho proudly said after the match: "We gave the ball away". His players let Barcelona keep the ball as much as they like.
Threats Neutralized
1. Barcelona is feared for its passing game
------ 1. Cut off their supply line to their front men.
------ 2. Stay in your positions. Let them play their passing game in harmless areas.
---------- Software designers/architects will be reminded by Barcelona of systems where objects call each other a lot but do noting else. e.g Ken Thomson in Coders at Work
---------- Business people will be reminded by Barcelona of paper-pushing company cultures.

2. Lionel Messi
------ 1. Just hold your ground. Avoid premature commitment and tackles. Let him make his moves first.
------ 2. Don't give him any chance for free kicks.
Your Own Attacks
1. Destroy their positions by pressing high. Win back the ball, the possession at the front with the intent to attack. Not merely for possession.
2. Exploit any positional mistakes.
------ 1. Barcelona's defensive weaknesses on the flanks.
------ 2. Direct balls over Barcelona's high defensive lines, to your own fast strikers.
3. Creating numerical supremacy during your own attacks.

I do recommend All The Way Jose for a nice read. You will be inspired to see how a mere translator for coaches transformed himself into an assistant coach and eventually into a world-famous manager of the world-famous football clubs.

on May 5, 2010

Meta-programming in Ruby : Part 16 : instance_eval

There are altogether 16 posts on this topic of meta-programming in Ruby language. Our approach encourages hands-on experimentation. The exercises here are specially designed to facilitate self-study and other independent modes of learning.

Provided we can find time amidst our busy schedule(well, who is not busy these days?), we will also discuss meta-programming in other languages such as Lisp and python.

Code 1

instance_eval and self.


# instance_eval evaluates a block of code
# with self set to the object that's receiving the instance_eval call.

add_two = Proc.new { self + 2 }

puts 1.instance_eval(&add_two) #=> 3
puts 2.instance_eval(&add_two) #=> 4

"stellar coding staff".instance_eval{p self}
[1970, 1980, 1990, 2000].instance_eval{p self}
{'a'=> 1970, 'water'=> 1990, 'gold'=>2010}.instance_eval{p self}
puts "\n\n"


# Here's a second example using an implicit method receiver.
call_reverse = Proc.new { self.reverse }

p "alan akhoe kid".instance_eval(&call_reverse)
p ["x", "y", "z"].instance_eval(&call_reverse) #=> ["z", "y", "x"]
p [1, 34, 117, 997].instance_eval(&call_reverse)
# OK BAD # p 12121.instance_eval(&call_reverse)


Result 1



[root@localhost ruby_tutor]# ruby ie_self.rb
3
4
"stellar coding staff"
[1970, 1980, 1990, 2000]
{"a"=>1970, "water"=>1990, "gold"=>2010}


"dik eohka nala"
["z", "y", "x"]
[997, 117, 34, 1]


Code 2

We can display private attributes using instance_eval.


class C
def initialize
@a = 0
end
def next
@a += 1
end
end
w = C.new
p w.next
p w.next; puts;puts

p w.instance_eval "@a" #=> 2
p w.instance_eval { @a } #=> 2
p C.new.instance_eval { @a } #=> 0


Result 2



[root@localhost ruby_tutor]# ruby ie_and_private_vars.rb
1
2


2
2
0


December 20, 2012

Settling Old Scores for New Years, for New Lives

I have settled all these scores unconsciously many decades back.

If I Had Done Well in Medical College


Then I became a doctor. Then, I would gradually admire those who sell blood-purification herbal powders, balms, cough syrups, itching powders etc -- yes, there are solid reasons for this admiration -- and become a sort of chemist. Given our backwardness and isolation in my days, I may work like Ms Tu Youyou and unearth some "Emergency Prescriptions Kept Up One's Sleeves."

Cracking medical recipes, understanding chemical compounds, testing ... THAT IS ALMOST IDENTICAL to what's I'm doing right now. Irony!

If I Had Taken Maths in the Regional College


Then I became an RIT engineer. That route would lead to my current destination even faster than the medical route.

If I Had Been Allowed to Study Chemistry in the Second Year


Then I became an IC(Industrial Chemistry) grad and then an RIT engineer. The same effect as Route 2.

If I Had Been Awarded Scholarship to Do a PhD in Theoretical Linguistics


Gazder? Terry Winograd?Fodor? The same effect as Route 2.

Delightful Irony


Medical Route. Maths Route.
Industrial Chemistry Route. Theoretical Linguistics Route
And the actually-happened Route.

They, like all roads, have actually led to Rome. Irony, but delightful irony,

Like Wreck and Jerry Yang's character in Hot Shot TV series.


All has been settled.

Good Luck to you all, and

HAPPY NEW YEAR!

User Experience: How to Improve Singapore Press Holdings's Advertising Calculator

We're solving that problem today from the viewpoint of user experience. Since this is a tatical detail, we won't discuss product strategy at all in this post.

Task 1 : I want to calculate the cost of this ad in text-only format.















Task 2 : I want to calculate the cost of this ad in "customized text plus some pictures" format. It means that I 'll use some different fonts and typographical variations and that I'll add some images somewhere inside.















How The Calculator Works Now


Step 1 : Select the Advertisement Category

  








Step 2 : Select the Publication










Step 3 : Click on Calendar to select Publication Date(s)











Step 4 :Select the Advertisement Type







Step 5 : Select the Advertisement Size

 










Step 6 : See Results















Solution for Task 1


Here we should use a text box. User copies and pastes her text/copy into the box, and our software counts characters, words, lines, width and height of the whole text/paragraph. Then, we gives estimate costs to user.

Solution for Task 2


Here, we should allow user to upload her ad copy as an image as in Facebook, Flickr etc. Then, our software will calculate its width, height and the estimate costs.

Basic image sizing, re-sizing are familiar to most programmers --- Imagick, Rmagick, PIL(Python Image Library), many PHP libraries and frameworks.

Humility


We know it takes many persons to change a light bulb at a company at Microsoft's level. You have many users so you must take extra special care not to break anything by your fix/enhancement.

I point this out just as an exercise and a reminder for future developments.

And I do notice that SPH has many other mechanisms and procedures to handle these problems very satisfactorily e.g. staffs at ads section can do this calculation for you. Maybe more cool alternatives that I may still be unaware of.

Product Development Exercise: Singapore Press Holdings Ad-cost Calculator

Underlying Principle


Tom Peters has suggested that we hone our design skills and design sensibilities by going shopping for under $10 and by learning do's and dont's from the things we've bought. Later, we'll refer to this as $10-design-learning activity.

Today Lesson


Today, we are going to learn from Singapore Press Holdings Ad-cost Calculator. Your task is to calculate cost for the following ad:

                          World Class

 As a software company,
    Do you want
    --- new product ideas?
    --- delightful user experience?
    --- outside developers grateful for your platform/APIs well-designed?
    --- a new leash of life for your current products?

                   More details at EthicMinds blog.

 Kyaw Kyaw Naing/ George
 B.A.(Hons, First Class), M.A., M.Comp.(Computing)
 time.proven.works@gmail.com


 

Tasks Hidden in Sub-Layers


I repeat: "Your task is to calculate cost for the following ad." This is not a straightforward task; nothing seldom is in web apps world.

To calculate the cost, you need to be clear about

  1.   What category of ad you are placing (Well done, the site handles this excellently.)
  2. In which paper (Well done, the site handles this excellently.)
  3. What Publication Date(s) (Well done, the site handles this excellently.)
  4. What Advertisement Type (Well done, the site handles this excellently.) That is, Run-On, Semi-Display, or Display.
  5. What size you want (Well, is this done?)

Solutions from My Weaknesses


Once a friend asked me in the 80s: "Do you know some martial arts?"
Me: "I 've studied 7 martial arts in 7 days each."
My friend, being a very smart person, stopped asking about martial arts.

Now, I know programming the way I know Wing Chun, Brazilian Jujitsu, Krav Marga, Kung Fu, Karate, Judo, Muay Thai, Bando, Kendo, Kempo, Cilat, Akido etc.

This calls for a WYSIWYG/visual editor,such as CKEDIT/TinyMce, or some other in-house versions, like the ones Facebook and Google are using.

Personally, I've seen it implemented in a Javascript book I read in Jurong East library, a red cover, published 3 or 4 years ago.

Personally, I've tested TinyMce with Ruby on Rails, PHP(codeIgniter) and Python(Django). I believe it will be fine with Perl, ASP.NET or Strut/Spring/plain JSP too.

Solutions from My Non-Weaknesses


I'm closing my eyes to see and inducing myself into what I call Walter Mitty- Dijkstra hybrid mode.

Dreaming wildly but not so in the clouds as an astronaut architect. ("The hallmark of an architecture astronaut is that they don't solve an actual problem... they solve something that appears to be the template of a lot of problems. Or at least, they try.") Dijkstra, on the other hand, always remembers that humans(he included) have small heads.

What do I see in my dream?

What do you see in your dream? What use cases, what user stories, what scenarios, what happy paths, what unhappy paths, what fault trees ?

What do I see in my dream? 
(Note: The following is written in dream-speak.)


There is a box where I can type in, what they call "text editor" in HTML.

There, I copy my ad's copy and paste it there. I can place a few images among the text as well. It can be drag and drop. Or I upload some images. Or I can choose images from a given list somewhere alongside the box. ....

When I finish arrangement, I click a button named something like "Preview." And I see my ad amongst some other typical-looking ads.

There I see how my ad will look like: Is it noticeable? Does it look cluttered? Too small? Too narrow or broad? Or is it too expensive? I close the Preview page and change my ad again: more words or fewer words, more pictures or fewer. bigger fonts or smaller.

  Do I need a border, a thick one or thin, a plain one or colored?2x3cm pic or 3x2 cm?

Edit -> Preview-> Re-edit ... till Save cycle goes on



After a few minutes, anyone can formalize this dream into a spec. (If you still need more help, email me for FREE help.)


Added : We solved this UX problem in a later post.

A Tip for Job Search: Gold Rush Skills

  If you need to make some money very quickly, what would you do? Your answer points to the kind of problems you can solve. They give you so...