And now for some digital nirvana ;-)

Dig this… 16 YouTube Videos all playing from the same SWF… digital nirvana !!!

digital nirvana

Once upon a time, in the not too distant past, I was asked to fix a rather nagging performance issue that involves playing more than 4 videos using a SWF-based streaming video player… well my first impression was to reduce the number of SWFs to just 1 while increasing the number of videos being displayed to something closer to 16 !!!

While I was not told doing this would be “difficult” or otherwise “challenging”… I was met with a certain amount of healthy skepticism and not only because the development team I relayed my solution to was not all that informed as to what the Flash Player might be able to do – they also were not all that informed as to what the Flash Player might be able to do in this regard.

So far, I can tell you all there is no real trick in playing 16 YouTube videos using the same SWF via a Browser – this works !!!   Now I think I will try to update the video player to use something a bit slicker than the standard-run-of-the-mill Chromeless YouTube Video Player…

Gee, I wonder what else I might make this little ditty do… ?!?  Maybe deploy itself to the Android Market ?!?  Oh, yes, this would be far too easy !!!  Try doing this with Java – I dare you !!! – LOL

Enjoy !!!

Why can human knowledge not be quantified ? And why do some people feel the need to try… ?!?

How much experience do you have using blah… ?!?

My response to this kind of query is generally… “A lot”… however saying you have a lot of experience does not seem to satisfy the questions for those who just have to think there is a way to quantify knowledge or experience.

The closest you will ever get to being able to measure human knowledge is…

You can measure how close to your own understanding someone else might be until… they end-up having more than you and then your ability to measure falls apart.

You can make people play guessing games to see if they know some things you think you know but again, the moment the person you want to measure has more than the one doing the measuring the process fails to please.

You cannot measure human intuition…

The ability to reach outside the box cannot be measured.

The ability to do more with one’s mind than has been done in the past cannot be measured.

I have interviewed with some hiring managers who said up-front they did not want anyone who had any kind of intuition…

I have to wonder about anyone who claims to be agains the use of human intuition just because… well my pets won’t be intuitive but they are animals… humans should use intuition because they can… simple as that.

Get over it gang, human knowledge cannot be measured any more than human experience can be measured.

Anyway, I prefer to take myself out of the equation when trying to determine what level of experience someone might have, were I the one faced with trying to staff some kind of software project.

It’s just too easy to become so self-deluded to feel as-though everyone sees it the way I do so as to render oneself so incredibly silly-stupid as to make the process of trying to make the determination useless.

If we all just focus on what the technologies we work with can do and then figure out what these technologies should do and then work on how to make these technologies do what they were not designed to do we might all learn enough to be useful.

Far too many people like to focus only on what the docs say these technologies can do and nothing more.

Python tuples are immutable

Yeah, until you learn how to change the contents of a tuple and then you figure-out there almost no such thing in Python as an immutable Constant other than the mere conceptualization of what immutable might mean so long as you really didn’t want something that is actually immutable and really unchangeable - but again, I might think my windows on the front of my home are immutable so long as nobody ever figure-out how to pick up a rock… in real terms I just cannot be that stupid as to really think, for any period of time, that my windows at home are any more immutable than Python tuples – cuz they are NOT.  Windows can be broken and Python tuples can be modified… rocks and lists were all made to resolve these issues.  On the other hand, I also don’t let just everyone know where I live either… and I don’t leave any loose rocks laying around my front yard.  Immutable is not always immutable… and constants are not always all that constant – at least where Python is concerned.

Sorry Google but when you want to talk to me abut Python you might give some thought to just how many hours I have spent using Python to solve real problems… and “yes” I too read where tuples are immutable but… that’s all the farther that one goes because I happen to know there’s almost no such thing in Python as a Constant where Constant really means “…it can’t be changed…” and by “…can’t be changed…” I mean “…it really cannot be changed…” and by this I mean “…it really cannot be changed because the freaking runtime keeps it from being changed…”.  Talk to me about immutable in Python when there is really no way to make Python change the value of the thing you wish me to think is “immutable”.  Darn, then you learn anyone can code a Python extension that gets a pointer to that pesky immutable variable with the evil intent to make a change without the consent of the Python runtime.  Oops !!!   Hey, maybe I just know Python better than you thought… OR… I am able to see how to get things done when everyone else says it ain’t possible.  Either way, I want to do it more when Google tells me I should not… maybe this has something to do with how one ends-up rebelling against one’s parents… or maybe Google simply wants to take control over how we use Python… either way… whenever I am told it’s not possible I tend to look for ways to make it possible – doing this helps me learn and learning is good.  LOL

 

Here’s what you won’t find coded using HTML 5 !!!!

HTML 5 ?!?  Huh ?!?

Here are 2 rather fun games that don’t use HTML 5 but do use Flash !!!

EdgeWorld

and

Galaxy Online II

Both of these games are fun and both make heavy use of Flash; both of these games will NEVER be coded using HTML 5 without Flash !!!

Why ???

Because HTML 5 without Flash is just too darned easy to hack !!! (See also: The End of JavaScript for the details…)

Heck, Flash is easy enough to hack but HTML 5 is just crazy easy to Hack… and by “Hack” I mean, I can make the silly thing do whatever I want including but not limited to being able to modify the runtime code being executed by my browser.

Any realtime multiplayer game coded using nothing but HTML 5 and JavaScript would simply be far too easy to hack to the point of making it just too easy for any suitably skilled person able to make this ill-fated HTML 5 game do whatever this suitably skilled person might want it to do including but not limited to making one’s in-game characters have god-like powers with infinite resources.

Flash is far more difficult to hack !!!

You can find tools one can use to hack a currently running Flash video game however – nobody gets to change the code without being forced to jump through some rather intense technical hoops and Flash-based SWFs can be obfuscated and encrypted where JavaScript cannot – in real terms.

Long Live Flash !!!

Hey, I just cannot be an Adobe-hater !!!

I happen to think Flash has more to offer than HTML 5 even though there are those who seem to want Flash to cease to exist… I think Flash is here to stay !!!

I never thought I might ever find a Free-to-Play Flash game I might be tempted to dump real money into and then I bumped into Galaxy Online II and suddenly I began to feel as-though I might be able to take-over the whole Galaxy… now I think Free-To-Play games can be really super cool as well as rather lucrative when they are well done !!!

Enjoy the games !!!

 

What does Google think about Python ?!?

Earlier today I had the opportunity to speak with someone from Google who shared these thoughts with me in regard to Python…

  • Python tuple objects are immutable.
    • Tuple objects lack the methods that allow elements of a tuple to be modified however… tuple objects can be recast into lists, list objects are not so immutable, after the change has been made the lists can be recast as tuples, as follows:
      • x = (1,2) # x is a tuple
      • try:
      •     x[0] = 11 # this throws an error
      • exception:
      •     print ‘Error Will Robinson…’
      • x = list(x) # now x is a list
      • x[0] = 11 # this will not throw an error
      • x = tuple(x) # x is now a tuple once again
    • Obviously the guy from Google who thinks he knows Python failed to understand this one simple thing about tuple objects – “tuples were made to be cast as lists”.
      • Python tuple objects are as immutable as your typical window pane is not breakable… so long as you “think” your typical window pane cannot be broken and nobody ever picks-up a rock you are right… however… rocks were made to be thrown by people who have hands.
      • The fact is… there are no objects in Python that are truly immutable however tuple objects lack the methods that allow tuple members to be changed unless one recasts a tuple as a list and then back again after one makes the desired changes.
    • Additionally, one could create a tuple subclass that allows tuple members to be modified.
  • When a global variable is assigned a tuple it is not possible to make any changes to that global variable.
    • This is just False !!!
      • There is NOTHING special about variables that hold onto tuple object instances.
    • It is possible to make Constants using Python however this does not come with Python’s Standard Library.
      • Tuples are NOT Constants !!!
        • Variables that hold onto tuple pointers are NOT Constants !!!
      • Not even a Python Constant will be truly immutable even when a Global Variable is used to point to the Instance of a Python Constant.
        • The only way to make a Global or Static Variable in Python capable of being truly immutable is to place that Constant into a Module that lacks the ability to allow the Constant to be changed at runtime.
        • Your typical Python Global Variable can be changed, which is to say your typical Global Variable is Read-Write and can be assigned to a different value that can be a different Instance of a Python object.
  • The special thing about inheritance is multiple inheritance.
    • One man’s special is another man’s who-cares ?!?
    • Apparently even Google’s Search Engine does not even know “what is special about python inheritance“… LOL
      • You might think something “special” about Python might be clearly special to everybody however this is just NOTthe case in this instance…
        • Is it any wonder I might not know this specific aspect when, it seems, not enough other people do know about it to make it to the first page of a Google search… ROFL
          • On the other hand, not even this Google guy was aware of how special this aspect of Python was to himself but then we can all hold things close to our own hearts without getting approval from the rest of the world…

I was disappointed in how little this one guy from Google seems to know about Python OR maybe I just dug deeper into Python than Google has…

OR

Maybe this Google guy think only hackers play-around with Python to the point of knowing the language inside and out and maybe this Google guy is only able to use Python in the most superficial way possible. ?!?

The great thing about computers is Computer Science… we can all test our assumptions to see whether or not our assumptions are correct or as-correct as we with them to be.

Also it’s refreshing to me to realize how human this one Google Guy is because he is not immune from wishful thinking where Python is concerned.  He “wishes” Python was a much better language than it is.  He “wishes” tuples are actually as immutable as he “wishes” them to be even though the language does not support his wishes, he continues to harbor his fanciful wishes.  This speaks well of his inner-child…

I like to stick with the Science… the way Python actually works… devoid of my own wishful thinking… Python tuples are no more immutable than my nose is unable to be cut off… I prefer to leave my nose intact just as one would have to prefer to leave a tuple instance unchanged but not because a tuple CANNOT be changed, just that one prefers a tuple to be immutable.

Try it for yourself and you be the judge !!!

Android-based Interactive Multimedia Presentation Builder and Player – Looking for Investors

Android-based Interactive Multimedia Presentation Builder and Player – Looking for Investors

Learn More…

Downloads to be made available soon… Stay tuned.

 

 

Tivo Wireless Networking Optimized

Recently I was tooling around with my Wireless Networking in my home and I happened to notice something interesting in how Wireless Networking can be Optimized for Tivo and other applications.

The beauty of  having Tivo when you have more than one of them comes in the form of being able to Transfer recordings from one Tivo to another.  When HD is being transferred the result can be less than fast unless you take care to Optimize your Tivo Network.

First let’s talk about the less than optimal Tivo Network.

Most people might be tempted to put Tivo on their primary home network along with everything else they are doing.  This is the less than optimal approach for what may be less than obvious reasons.

TCP/IP deals with packets.  Routers tell packets where to go.  Tivo likes to pass a ton of packets around when recordings are being transferred from one Tivo to another.

Build a separate Tivo Network !

This requires the use of a Wireless Router like the Belkin N600 Wireless N+ Router and several (two in my case) Belkin Dual Band Wireless Range Extenders.

  1. N600 connects to the Internet.
  2. Each Belkin Dual Band Wireless Range Extender connects to the N600.
  3. Each Tivo connects to either the N600 or one of the Belkin Dual Band Wireless Range Extenders.
  4. Now you have a separate Tivo Network.

I was able to Transfer 1 hour long NCIS shows recorded in HD pretty darned fast as compared with the other way to network Tivo and then 30 minute HD shows can take hours to transfer.  In fact I was rather surprised I was able to transfer as many 1 hour HD episodes from one Tivo to another using my optimized wireless Tivo network as I was versus the normal way a Tivo network might be deployed.

Performance Test

Able to Transfer 1 hour of HD NCIS in less than 15 minutes !!!  This is using the Tivo Network I have outlined in this article.

This is the way I have been wanting to use my Tivo for a very long time and I happened to hit this purely by serendipity and then only because my house happens to be really well built and wireless access from the outer portions of my home can be a challenge – signal strength falls-off rather quickly just by walking into a different room off center of my home.

The only problem I have with Tivo is that I cannot Transfer content from certain Premium Channels like HBO and SHO but every other HD program is pretty much fair game and doubly so when the same program can be gotten from Netflix or Hulu.

Now I can use one Tivo to record certain programs I might not have space on another Tivo to record so if I had 3 Tivos I would really have one massive Tivo with the ability to record 6 programs at the same time – not exactly up to par with the latest Tivo that has 4 tuners each but good enough for the time being while waiting for the latest Tivo price to fall sufficiently.

HD Tivo Transfers are so FAST !!!

Now my HD Tivo Transfers from the other room via Wireless Networking is so FAST I can begin a transfer and watch at the same time with absolutely no lag at all !

Also I can see the progress bar moving while I am watching the HD Program being transferred.

I call this success !!!

Not bad for a guy who learned how to optimize networks by using them over the years !!!

 

How can you tell when a software algorithm can be parallelized ?!?

Parallelization is a pet project of mine and has been for many years…

Recently while interviewing at Paypal, who by the way does NOT hire talent and especially NOT talent who has a conscience… more on Paypal later…

Parallelization…

Algorithms that seek to collect data can be more easily parallelized than the other kind.

This means Analytics Application are ripe for parallelization because Analytics is all about collecting aggregations from raw data.

How to…

All you need is a bit of experience with TCP/IP in the form of connecting a Process running on one computer to a Process running on another computer – repeat this as often as possible and you too can create a network of Processing Nodes each of which is connected to the rest – the real magic lies in how you achieve this goal in an efficient manner.

Next, you need to find a way to ask each Processing Node to perform part of the Aggregation Process using one chunk of data each.

Then find a way to get each Processing Node to make the request for its chunk of data at the same time, or as close to the same time as possible.

Then find a way to collect the results from each Processing Node in a parallel manner – again this is where you will find some magic.

HINT: TCP/IP is useful because it allows many requests to be made at the same time while allowing many results to be collected very quickly.

Before you know it you have the framework for parallelization but again there is ample room for doing some magic within the framework.

HINT: Python is easier because Stackless Python combined with multi-threading combined with TCP/IP combined with Parallel Python and Cython and Psycho… can’t get this much bang for the buck from Ruby but you can surely try if you must.

HINT: If you are me then you are more able to use your experience to make your typical non-aggregating algorithm into one that does perform some kind of aggregation… ;-)

Paypal’s Interviewing Practices and the lack of ethics

Once upon a time I interviewed with a guy at Paypal who asked me to code a datetime object using an unspecified language who also did not stop to consider his goal had already been accomplished in just about every computer language he or I might wish to use… I mentioned this during the interview and he failed to respond with anything other than his lack of desire to continue… My question was driven by my desire to be ethical since I consider it unethical to write code where an existing solution has already been accomplished and I wanted to know “why” I was being asked to violate my own sense of ethics – not that I am opposed to violating my own sense of ethics so long as I can respond to the questions I might be asked to give later during the deposition in case the request results in legal action as most ethical breaches will eventually.  I have to wonder about professionals who have not spent any of their time thinking about what may or may not be ethical behavior.

Why “ethics” ?

Because I am a professional software engineer who, from time to time, write code by the hour and if I were to spend billable time (as would be the case for Paypal in this instance) working on code I knew had already been written I would feel as-though I was taking money under false pretenses and this would be a breach of ethics for me – not that this guy at Paypal would feel the same because he apparently had no ethical problems with asking me to work on code I would not otherwise have to build.  Maybe if those who ask contractors to work would also stand behind their requests someone like me would not need to develop a sense of ethics… think about it because I have.

Realistic Interviews !?!

 I think professional interviews should be 100% reflective of real life which means if I were actually asked by some manager to work on some kind of datetime object and I actually did so rather than using one that already exists I would hope I would be considered to be less than honest because aren’t I supposed to know what software objects already exist versus the ones that don’t ?!?
Consider the other side of this coin… what if I approached my manager at Paypal and asked him or her for permission to work on something and the something I asked to work-on already exists as some kind of open source thing I could have much more easily used ?!?   Would I have to not be completely dishonest if I were being paid by the hour to spend billable time working on something that already exists ?!?  I would think so but then I have a sense of ethics and a desire to not waste my professional time.
Interviews should be as realistic as possible in terms of professional expectations and professional ethics.
Nonetheless… I will remain as ethical as I can be even when it takes money out of my pocket because this is the right thing to do !!!
And those who lack ethics are generally punished by the legal system sooner or later…

Ruby 1.9.2 uses Real OS Threads !!!

Yeah – Rejoice Ruby-nauts !!!

Ruby 1.9.2 uses Real OS Threads !!!

Here’s the Code !!!

 

Here’s the Proof in Living HD Color !!!

Ruby 1.8.7 does NOT use Real OS Threads but Python does !!! Proof !!!

Proof that Ruby 1.8.7 does NOT use Real OS Threads !!!

How many times have I heard someone tell me Ruby 1.8.7 uses Real OS Threads and always has from the beginning ?!?

Far too many times…

You see, some people are so deep in denial they want Ruby to be what it is very clearly not and cannot be.  They proclaim Ruby can do everything it cannot do like use Real OS Threads by default without so much as taking the time to give it a real objective test.  Here is a real objective test.  I have no vested interest in either Ruby or Python, my only interest is in testing to see which is using Real OS Threads.

Ruby uses green threads which is to say Ruby simulates the use of Threads but it does NOT use Real OS Threads by default. There are some Ruby Gems out there that do allow Real OS Threads to be used but Ruby itself by default does NOT use Real OS Threads.  If Ruby did use Real OS Threads one would see the Real OS Threads when one views the process at runtime.

Python 2.5.x does use Real OS Threads because you can see the number of threads appear when viewing the process at runtime.

You cannot fool the OS.  When the OS knows there are Real OS Threads they show-up otherwise nothing but a single thread shows-up.

Run the tests. Write some code. Look at the OS Process.  See the Proof. It’s just that easy !  In the meantime, don’t try to talk smack to me unless you have actually seen the proof for yourself !!!

Look, if you want to prove me wrong then prove me wrong but do it with code I can run in my own Ruby right here with my own computer(s) or don’t bother to tell me how wrong I might be… On the other hand, if it helps me get a job and earn some money then I don’t mind letting certain select people tell me how wrong I am while I am taking their money – after I have cashed all the checks I will be right back here testing to see who’s right and who’s wrong.  So far Ruby keeps telling me how much it don’t use Real OS Threads…  and I am not the only person saying this even though people keep telling me just how wrong I am.

BTW, I am NOT the one who is wasting his money on Ruby… When it’s my money I don’t throw it away trying to make-believe Ruby is what Ruby cannot be.  I know exactly what Ruby is and how it works.

So here’s the Proof !

The Ruby Code:

The Python Code:

The OS:

  • iMac Core i7 running OS/X 10.7 Lion
  • Ruby 1.8.7
  • Python 2.5.2 Stackless 3.1b3 060516 (python-2.52:61022, Feb 27 2008, 16:52:03)
  • [GCC 4.0.1 (Apple Computer, Inc. build 5341)]

The Proof

Conclusion

Some people hear the work “multi-threaded” and they fail to look any deeper into the issue because they will concluse, “…I can use threads therefore it must be multi-threaded…”.  It is possible for Ruby 1.8.7 to be single-threaded from the OS Process perspective while being mutli-threaded from the perspective of Ruby within the larger context of a single OS Thread.  Everything that happens in Ruby 1.8.7 that does not specifically use real os threads will use simulated green threads that are not real os threads.

Yet another Ruby on Rails Programming Test *yawn*

So here we are again with yet another Ruby on Rails Programming Test !!!

Maybe someday people will just take as proof everything else I have publishing here but that day has apparently not yet arrived…

The Problem – Not exactly any kind of real business problem…

Rails Exercise:

We’d like you to create a simple Rails 3 application.
Create models that allow a user to follow another user.
The user model’s only attribute is “name”. You may scaffold the create action.
Create an interface that accepts post requests that allows users to
“follow” other users.
The user’s “index” action should list all of the users.
The user’s “show” action should show:
1) The user’s name
2) The users the user is currently following (with a button to remove
that following)
3) The users the user is not following (with a button to add that following)
4)  The users currently following this user
Do not create a login system for this exercise.

The Solution

Download it from this link; only 600 KB  !!!

Follow

Get every new post delivered to your Inbox.

Join 328 other followers