Back into it?

It has been 7 years, 3 months, 14 days since I last wrote on this site.  A lot has changed since then.

The current President is Donald Trump (yes, “The Apprentice” reality tv star, and we’ll save the analysis on what that’s meant for another time).  Facebook’s stock is now almost $200/share with 2.4 Billion MAU, which represents more than 1/3 of the world’s entire population.  Autonomous (self-driving) cars are already available, though in very limited number, and with extreme regulatory restrictions.

On the device front, the latest release of iOS is 13, and the latest hardware is iPhone 11.  Microsoft’s surface team (see my previous post) just announced multiple new products, including Surface Pro 7, Surface Pro X and Surface Laptop 3.  I honestly have lost track of how many generations of iPads, Android tablets, and other “mobile devices” have launched, and already become obsolete in the last 7 years, but suffice to say it’s been at least once a year, and even with “device fatigue”, there’s no reason to keep developing new devices.

On the personal side, I now have been married for more than 8 years and we have two children; boy and girl, ages 4 and 6.  We moved to a new home near Calabasas and I work in Product Management.  In all this time I actually have written a lot, but haven’t published anything, but I suppose it’s just that time again.

For one thing, the world is a little more intimidating than it was since my last post, and not just because I am now a parent (though that surely has changed the lens by which I view it).  Just last year, shortly after purchasing a new home we nearly lost it to a wildfire.  Just last week, there were nearly 10 fires in one week across the Los Angeles area alone, and I personally witnessed and called the fire department about one just a few blocks away from my house.  Fires have always happened, but it’s fair to say that it was an anomaly for forest fires to burn down homes and displace thousands of people – usually some freak of nature where the winds and dry conditions just happened at the same time near a populated area.  But that’s California’s new normal, and my kids will never know anything different.  As a firefighter friend and neighbor told me, some kids have “snow days” where schools must close, but in California our kids have “fire days”.

On the digital and technology front, we’ve reached a point where digital media has all but replaced traditional media.  Physical Newspapers are all but gone, replaced by digital versions of the same, and social media itself has become transformed, with new types of neighborhood based social networks and services like “NextDoor” and “Citizen” that aim to keep you informed about what’s happening in your area.  Personal digital surveillance has advanced, with camera products like “Ring” and “Nest Cam”, and Netgear’s “Arlo”.  And along with this, the evolution of IoT (Internet of Things) which connects every device to the internet and let’s you have a true “Smart Home” allowing voice activated devices like Amazon’s “Echo” or “Google Home” to turn on and off your lights, your fans, and even tell you when your laundry is done.

On the content delivery side, we’ve made massive strides with streaming technology, all but eliminating physical media, and Virtual Reality is now going mainstream with consumer devices by Facebook, PlayStation and mobile manufactures like HTC driving a new market of enthusiasts and hobbyists.  Mark Zuckerberg has said VR (and AR) is the next computing platform, and I happen to agree wholeheartedly.  Whether you’re a fan of Snowcrash or Neuromancer, or never heard of either, there’s no question that the future is a virtual one.  This is a topic that I’ve always been passionate about, and it’s an exciting time.

On the news and information side we’ve hit a critical challenge, with digital content being so readily available and the means to produce and distribute it so freely accessible, it’s introduced a new opportunity for propaganda and disinformation to spread much like the California wildfires on the winds of technology change, reaching global populations like never before.  Media literacy has never been more important, and understanding that everything we do and say can be used against us is also part of our new reality.

As I write this, I now know every word can be used to determine which products I’m most likely to buy, to decide whether I should be considered for a job, whether I should be sold a loan, or whether I can be persuaded to vote for a particular candidate in the next Presidential election.  My words can be used against me simply because once online, they can be mined for keywords, tone of voice, and bias.  And all of this is automated, using algorithms and predictive models.

There’s so much more I want to write about, including how all of this impacts my children, who are even now presently glued to 8″ screens less than 2′ from their eyes, consuming advertising free content nearly 3 hours a day, and up to 5 on weekends.  Who is influencing them, and how, and do I even know what they are watching, or how it affects them?  My children are guinea pigs in this new world, growing up never knowing what the world looked like before having everything on-demand, from the dinner we order on Postmates to the classic cartoons they watch on Boomerang, to almost never having to shop in a physical store for clothes.

Again, it’s been a long time, and a lot has changed, but one thing remains – I’m still as curious as ever about technology and there’s still very much a geek in me.  I’m still an out of the box and creative thinker and a self-declared futurist, and I still believe that all this scary technology stuff continues to make the world better.  Maybe some of the ideas I have here might contribute to that, and I think now after a long hiatus, I’m ready to dive back into it.

Surface – First Impressions

Hello Surface.

Welcome to the ever-expanding and evolving “mobile device” market.

Yesterday Microsoft announced their tablet.  It’s just a teaser announcement designed to get the technorati talking, and of course until anyone has hands on one they can’t really give this product a proper review.  But here are a few thoughts that have come to my mind after today’s announcement.

Tablet PCs are nothing new, so what’s so amazing about Surface?  So far, it looks like a Microsoft branded iPad, with a solid black border around the screen, a video camera(oriented for two handed operation), and a single control button on the bottom.  Of course it’s got some accessory ports, which probably would also be found on your favorite Android device, and an oh-so-pretty keyboard.  The keyboard is likely the most compelling feature for this tablet, especially one that is lightweight and doubles as a cover (though we never see that in any of the photos, so how well it works we aren’t sure).

Still though, one thing that I don’t understand about companies that compete with Apple’s marketing machine, is why they still don’t do what Apple does  – show WHAT the product does, and tell me WHY I want/need one.  It seems most companies have done a good job of recognizing the importance of design now, but still seem to be forgetting even a great looking rock is still a rock.

Typical examples would be the “Droid” TV commercials which always show a futuristic looking phone, lots of explosions, robots, crazy action, and high production value.  What bothers me is that as cool as those commercials are – it seems to imply that the product is nothing remarkable, and advertisers must sell it based on metaphorical value, rather than it’s actual value.

So, having said that my first frustration is that Microsoft has what looks to be a very sleek, well thought out, and truly good looking product but still does nothing in this announcement or teaser but demonstrate that it exists and it has several colors of keyboards.  I’m not sure why that is such a bold announcement.  Well, it’s actual hardware from a software company, so that’s interesting.  To be fair, the about page which goes beyond the press release does share a bit more

Having said that, Windows RT and/or Windows 8 seem to be very nice looking operating systems, and ideal for tablet computing but let’s be clear on our intentions with this (or any tablet product).  Aside from gaming, and other graphics intensive applications, the power of tablet computing (and mobile in general) is the client server model… processing in the cloud is what has enabled our devices to be as powerful as they are today.  Apps are all about delivering our content where we need it to be – not just having another tool to see/use/store on a local machine.  The mobile internet is all about connectivity and sharing – this is why Apple did deep integration with Facebook, Twitter, and created a whole API for iCloud.  Tablets are more convenient than laptops or desktop computers, and that’s what we love about them.  Pull up the latest book you’ve purchased from Amazon,  browse a list of homes on the market anywhere in the country, or take some notes on a meeting and have it automatically sent to your phone, your work laptop, your home desktop, etc.

Yet none of these things requires nor is benefited by a complex operating system, with heavy I/O, disk based storage, and/or loads of peripheral drivers, typical features of past Windows versions.

If Microsoft chooses to pollute their tablet, or their tablet OS offerings with these things, they will be left in the dust while competitors focus on creating devices and software that actually enable a realization of Larry Ellison’s “network computer“.  Mobile is not about taking your computer with you – we can and do already do that with laptops.  Mobile is about leaving your computer behind, and taking only your content and services on the road.  Even a laptop computer does not need a GPS, and a mobile tablet does not need an external monitor, or a disk drive, or a printer.  So for Microsoft’s sake, I hope the “full computer” approach (which seems to be the biggest hook so far) doesn’t backfire – personally I would be interested in a tablet running Windows RT, but it would take a lot to convince me that it would be worthwhile to pay to have a full OS running on one.

Let’s face it – people can complain all they want about the limitations of tablets, but as every developer (and carpenter) knows, you can’t use a hammer for every job.  Tablets aren’t just some next version of computers, they are a new species of computer, that doesn’t replace what is already there, it supplements it.  Of course, I can and have been wrong about these things, so who knows – perhaps Surface is the product that will take down iPad/iOS and Android devices!  I for one am looking forward to finding out soon.

Facebook’s Future

As anyone who has read a news article or listened to the same would know, Facebook went public. But it wasn’t the next Google, with soaring IPO stock pricing, and ordinary Joe’s turning overnight into millionaires. There’s a lot of reasons for that, but I’ll leave that topic for another time.

Suffice to say in my family, groups of friends and work, an ongoing discussion had emerged about what is Facebook, and why would anyone want to buy stock in it.  It seems all anyone sees in this company is it’s media attention, stories both negative and positive about it’s founder, and “social networking”.  Just like my past article on the threat of crime on social network, or current theories in the press about how many people actually are regular users – there’s a world of misinformation, speculation and downright untruths about Facebook.

I don’t claim to be an expert in this field (if such a thing exists), but I want to share my opinion for my friends, family and colleagues.  If for no other reason than to help keep discussions focused, and less emotional.  The debate about Facebook these days is much like a heated debate about Apple vs. Microsoft – though the latter has lost some steam since companies like Google, Amazon and now Facebook have demonstrated that their brand of services oriented technology is agnostic of operating systems or even hardware.

 

Isn’t Facebook just a passing fad?

 

People “love” or “hate” Facebook.  They curse the company for innovating and iterating on it’s products (such as adding Timeline) or they put everything in their lives onto the network, including pictures of their baby’s potty training (yes, this really happened to a friend of ours).  The press builds hype over it’s IPO, and then days prior every financial paper report that it’s overpriced.  When the stock isn’t a huge success, lawsuits emerge blaming Facebook for not telling people its real value.  I don’t know why this is such a shock, we already knew the stock was overpriced.   I’m sure we all WANTED it to skyrocket, because it would feed the belief that getting rich quickly is the best way to get rich.

I’m no investment advisor, but once the hysteria dies down and the company goes back to doing what it was always doing – re-inventing the way we communicate online, the stock will be a good long term buy – because the company can and will continue to grow.

It’s perhaps a lot irrelevant now, but when I first discovered the internet in 1993, before the World Wide Web existed, I hypothesized that from a socialogical perspective it would eventually change the world, and how we communicate.  I hypothesized after the introduction of NCSA Mosaic and later Netscape that pretty soon every billboard will have a web address.  Needless to say my friends told me I was grasping – that no one cared about that geek stuff.  I’m not a seer, and I don’t propose to know the future, but I do have a keen observational sense.

While people complain about how useless social networking is, a high school student with relatively little knowledge of actual computer science can now use Facebook to build an online/social game that literally millions of people (starting with their friends) could play.  A musician can build a network of fans, and share concert dates with them, without spending a penny out of pocket (not even web hosting).  The next generation of “creative creators” as Jonah Leher would call them are evolving online today as a result of social networks.  But that I believe, if we are looking for the long term value of the company is still just what we can see on the surface.  There are several companies that do social networking, and yes, some even do it better than facebook.com.

If we use an analogy to describe social networking as a series of communities that have grown from a set of small towns into massive metropolises, then Facebook is providing the infrastructure (the roads, the bridges, the telecommunications, the electricity, the plumbing, etc. ).  Social networking can and does exist without these things, much as cities can and do exist off the grid (mostly in the third world), but Facebook isn’t just a social network, it’s a social networking platform.  That much was evident to me when I first encountered it in 2006.  I fought hard to get my company to build a product for Facebook’s newly introduced Developer Platform, and I argued with many friends and colleagues about the value of doing so.

Facebook and companies like it are technology companies that provide a foundation for just about any product.

 

SSO – The Holy Grail

Today, using Facebook Connect, if you want to make “signing up” easy for a user of your service or mobile product, you can log them in via their Facebook account.  Google and Microsoft have been doing this for a long time as well, and there has been a large movement to have an open platform (OpenID, oAuth, etc) – but it wasn’t until Facebook introduced their version, that “Single Sign On” or SSO became as ubiquitous as it is today.  Even people wanting to support the other techs such as OpenID are eventually moved to incorporate Facebook Connect because if there’s one platform that everyone is on – it’s Facebook.  And why not?  I know as do many of us, plenty of family members without Gmail, or Microsoft Live accounts, but yet they have a Facebook account – so if you’re going to want a single sign on, why not use one everyone has.

Just go to your favorite website or mobile product, or a new startup company today where a free subscription model exists and see for yourself.  In 2008 I attended Digital Hollywood and at one session, the product team for Facebook connect was entirely unable to communicate it’s value to the community – they fumbled on about technology and the value of SSO, but no one seemed to be paying much attention.  Now it’s essential.  Things change, quickly.

 

Why should anyone care?

 

Most people are consumers and users of services.  We use our electricity, we don’t create it ourselves.  But social networks are different – the value of the network is that we contribute.  The value of Facebook on the surface is us.  But underneath the surface, below the house you build is a network of pipes and cables and all the other things that make it possible for your house to be liveable, and that’s what Facebook as a company continues to build and maintain.

Facebook is a technology company, not just another social network.  This is what set it apart amongst the literally hundreds of competing social networking companies.  This is what made it a force of nature.  Earnings and profits are only a small part of the equation.  Cities may grow according to economic factors, but the infrastructure that supports these cities is paid for by taxes.  Every photo we add to Facebook, or status update we pass gives the company more social networking revenue.

Facebook isn’t the only company that works this way.  YouTube which is owned by Google spends hundreds of millions if not billions on providing a service with very low profit margins, but why then do we continue to pump it full of content – making it the most relevant and important video platform online?  Why do entertainment companies eventually agree to put their content online, and even allow in some cases other users to remix it?  How did it get that way?  Perhaps topics for another time, but for purposes of this discussion – YouTube, Facebook and also Twitter all have something in common – when they started, and even into their most successful days they had no way of making money, and yet all three of these are visible today in television commercials, and at the bottom of nearly every piece of content online.  An Australian study recently indicated 41% of people posted to Facebook while watching TV.  We’re going to see more of this, as “Social Television” evolves, in partnership with companies like Facebook and Twitter.

Sounds like possible future “revenue stream” – business development/strategic partnerships. Facebook provides not just a service to its customers, but a service to companies that align themselves with it. The big news of General Motors not advertising on the platform doesn’t change that reality. GM probably shouldn’t be the guide by which we all live anyway, considering the utter failure of its own business model in past years.

 

So..

 

Here is my final thoughts. I’ve no doubt Facebook will prevail. It’s one of the most misunderstood companies out there.  Perhaps someday I’ll have the pleasure of working there, but for now – I’ll settle for owning even just a small piece of it.

Consumers of Internet services are a finicky bunch. We may decide to “hate” a product and stop using it, tell all our friends the same, maybe even endorse a rival. Companies that rely on existing customers for value may have a tougher time than those that rely on the numbers of overall customers. Twitter, Facebook and YouTube are services that may have “followers” or as Malcolm Gladwell would call them “mavens”, but the real value is the viral network which is when everyone including your grandparents go to watch a video, retweet a link, or in the case of Facebook, everything else.

Most importantly though, unlike virtually everything else out there which relies on search engines such as Google to find it, Facebook content remains on Facebook.  You can’t search it with Google unless you specifically make content public.  This means the global network tied to all that content is managed by Facebook and isn’t freely available for anyone to take online.  If you post something ON facebook, only people who are ON facebook can read it.  This is critical to the company’s long term success.

If the company went out of business tomorrow – that content would have to remain, it would be passed along to the next company that will provide the same service.  That means that just by putting content into the network, you are raising the market value of the company – forgetting about the ads and the paid services, and all the other revenue streams.  The content is worth billions of billions – no one wants to lose that content.  The demographic, and historical data that Facebook now owns is enormous in value.  If Facebook turned on search at the level of Google, across their entire network, of every post, update, video, image, etc, it would change what we think of as search entirely!  They won’t do that anytime soon though because of privacy – and its that privacy that continues to provide the platform that we are all comfortable using, but the point remains that the potential for growth is there.

In the end, once all the dust settles, I think it’s a good buy, not because it will make you rich quickly, but because it’s a good company, with good ideas, good people and a positive impact on our world.

4 out of 5 Burglars Prefer Facebook?

Yesterday my family distributed a news article about the role social networks play in burglaries. I’ve provided the link here for any reader’s benefit. I started to reply via email to this, but I realized it really was a bigger response than that, so I decided to write it here, for the benefit of anyone who happens to find it interesting.

The link: http://www.mediabistro.com/alltwitter/social-burglars_b14237

 

DISCLAIMER

To a degree, it could be said just by posting online, I’ve increased the likelyhood of a stranger stalking me, or burglarizing my home, or otherwise invading my privacy. After all, my name is publicly noted and I’m sure anyone could “Google” me to find out more about me if they so desired. But more on that, later.

Also, note that I’ve broken down my thoughts here into digestible bits.

THE STUDY

While I don’t refute the study, I think the findings of 50 admitted criminals asked their opinion about social networking risk doesn’t seem very reliable evidence of anything other than the ubiquitousness of social networking.

In fact, the real message I feel we should have taken away from the study itself is that burglaries are typically repeat incidences or otherwise performed by people who already know you. Also a big part of the findings – that even a basic alarm system would be a deterrent.

So I will concede that if you “friend” everyone you meet, even when you hardly know them, you are definitely exposing yourself to risk. I’ll also concede that social networks that are more “public” such as twitter, foursquare and others expore you more than those that have privacy controls such as Facebook, and the study provides no distinction – so it’s easily mis-read that people commonly use Facebook to burglarize homes.

If you read the study, it also states that Google Street View was a common tool used by criminals. This makes sense, as you can “see” the home from the street without ever having to be on the street. Considering the study was made in the UK, that’s not much surprise that Google Street View would be attacked as European governments have for some time been fighting Google Street View for anti-privacy reasons. For years though, even before Street View, you could also see the home from a satellite, and I’m sure that also helped burglars who choose to use digital technology to “case the place”.

THE POINT

These new “social networking sites” are no more evil or dangerous than rock and roll was in the 50s, or drive-ins, or underage drinking. Nefarious activity could be attributed to all of these things, as well as various levels of personal risk, depending on how you look at it. Social network is just that new thing that scares people, because we’ve all become accustomed to locking our doors and hiding our identities because we live in such a dangerous world. Being smart and savvy isn’t new, and neither is being ignorant or oblivious. Should we ban automobiles because people drive drunk? There can be no good without evil, and no evil without good – this is fundamental, so all we can do is make informed decisions and be smart.

My opinion is that what makes the world dangerous is lack of communication. The less we talk to one another, the more dangerous our society becomes. I’ve spoken online and anonymously in the past to someone who hated me and my kind, solely because that’s what they were taught, or otherwise picked up from their environment. In a few minutes, I was able to communicate with this person at no risk to myself, a conversation such as that would have been impossible in person. The result of the conversation was that I was able to see their point of view and they mine, and while I do not know whether the experience changed their life it enriched my own.

THE REAL IMPACT ON SOCIETY

I don’t think social networking sites are tearing apart the fabric of society. Rather I’d argue that in nearly every way, it’s these social networking products that are rebuilding it, or otherwise holding it together. Education is social now – Wikipedia being as popular as Google for finding out information, and often even more reliable, because Wikipedia does not advertise and thus is not motivated to create content that generates “keywords” for search discovery purposes.

Yesterday Steve Jobs passed away. Hundreds of millions of people expressed their feelings about the man in a nearly simultaneous wave of social networking posts minutes after the news was heard. Prior to twitter, and the other social networking tools, news such as this would have been spread by “authorities” of information, and the reaction of real people would have been “reported” by a reliable source. News across the world would have spread over weeks and not minutes. It was a major event – a man died who was a public figure, a business mogul of his day, akin to a Thomas Edison or John Rockefeller, and we all knew minutes after it occurred.

Try to comprehend for a moment hundreds of millions of people in a matter minutes sent their thoughts about the event into the digital ether and social networks captured that moment in history.

When I was in Europe recently, I tried to check-in wherever I could. I wanted to share my photos, my experience, and my feelings about the places I was, and the things I was seeing. There are many people, including close friends and family that will never experience these things for themselves, and just as I have been able to travel to lands far away or see events where I was not present from my own friends, I am eager to share these things with the world.

THE IMPORTANCE OF SHARING

If we didn’t share, there would be no books, and no blogs, and no photos, and no movies, and no stories… If we didn’t share, there would be no knowledge, no science, no insight and no inspiration. Sharing is the basis for our entire existence, so there’s no reason to be afraid of it, simply because sharing your ideas, thoughts or opinions may expose you to others. This is true of anyone who shares. If you open a book, it gives you the author’s name. It gives you where they live, sometimes even a photo of their home. Google fills in the rest of the details. You can choose to follow this person online, and if they so choose to share it, find out when they are out of town, and then rob them. But is that reason for them to stop doing what they they do?

FINAL THOUGHTS

Because a few people decide to use technology for bad purposes, we shouldn’t stop using it. There can be no good without bad, and no bad without good, but when it comes to the internet – and the moral choices it presents… the good inevitably outweighs the bad or put another way, the cream eventually rises the top. As technology evolves and brings us closer together, there’s going to be more people wanting to use it for harm, so protect yourself by arming yourself with knowledge (such as not to click links in email without knowing what they are) and using an alarm or other deterrent (such as virus checkers, etc.), but don’t be afraid of what’s happening around you – embrace it, because it’s not going to stop evolving anytime soon.

 

My Opensource Radar

It seems like forever since I last posted a blog entry.  This is less that I haven’t written, just that I haven’t published.  It’s difficult for me to “stay focused” sometimes when there is simply so much happening so quickly in the open source community around me.

It seems every week something new catches my eye, but I barely have time to learn it, much less apply it to any real world problems.  This is truly an exciting time in the open source world.

I can recall the early days of the web when I used to go to the Yahoo homepage and look up “Programming Languages” in their index.  Now, there are so many programming languages, that it’s simply impossible to keep up.  But, there’s a few things that have been on my radar for a while, and I wanted to quickly document them because it seems to me that these new technologies have a long future ahead of them.

The first is NoSQL.  I’ve been following NoSQL and tinkering from time to time, but I haven’t yet built anything public with these tools.  I’ve heard from a close friend and colleague that they crack under heavy demand.  More on that later.

The second technology trend is “functional programming”.  First experienced with CouchDB, written in Erlang, then I’ve been seeing “Haskel” and other programming languages popup from time to time.  I find that I really need to study pre-calculus and/or calculus though to really appreciate these languages and their roots.

The third and perhaps the most compelling to me at the moment is “JVM” languages.  Quite ingeniously people realized that while Java has become a bit bloated, there was a simple elegance to having “virtual machines” that already ran on every platform.  So people started porting languages like Ruby and Python to JVM, and now with the introduction of Groovy and Scala, we’re starting to see Java completely redefined.  I have started to learn Scala, and it’s actually really intuitive.

Lastly, there’s “non-blocking” frameworks, most notably server side javascript and Nodejs. I did a little test with nodejs, just building a simple template driven site for my wedding, but I never really finished it – mostly because at the time I was building it, the main packaging framework was down due to a couchdb replication failure, so I had to resort to manually installing dependencies… by the time I went through that, I really didn’t have the energy to do much more than a basic templating system.  Of course I could have saved myself many hours of work if I had used something like the Express web framework (basically created by Sencha), but as npm was down, there just wasn’t an easy way to deploy it at the time.

Unfortunately, my day job provides me with no opportunity to play with these new technologies, so I am limited to a few hours a week or maybe a weekend day when my wife is busy with errands, but I’ll always do my best to stay on top of what is new, and fresh in the world of web applications.  Even did a little studying of iPhone application development a few months ago, but didn’t get much further than the basic tutorial app.

My big problem seems to be there’s so many great product ideas, but I only have a limited amount of time to build one, so I need to choose something that’s fast and easy to build, and provides immediate value.  Still working on that, but I’ll let you know.

RubyonRails’ ActiveRecord vs. Django’s ORM

I’ve just recently started to explore Rails, Ruby and ActiveRecord.  There’s a lot to be said about the transparency of ActiveRecord, as it keeps your code relatively clean, and makes it very easy to quickly deploy database driven sites.

ActiveRecord supports inheritence but it requires that your parent table have a special column named “Type”.

Django’s ORM is deeply entangled with Django, which means it’s difficult to migrate, however it does NOT restrict you significantly on naming conventions – it simple builds tables according to classnames including their containing modules.

So if you django app is called “myapp” and you have a models.py with three different classes, “A”, “B”, and C”, your tables will be found as “myapp_a”, “myapp_b”, “myapp_c” respectively.

My recommendation is to use Rails to rapidly prototype your application, then migrate it to django.

First Adventures in Ruby and the Rails

After learning Python and playing with Django, I really didn’t see any need to explore other languages, and certainly not RoR. I’d played with RoR around 2004 when it was in it’s infancy, and I was not impressed. I’d tried at that time to learn both Python and Ruby – looking for a graduation from Perl, but both were very complex. In the end, around that same time I was starting to do a lot of my own personal PHP development, playing around with WordPress, etc.

Ruby on Rails came up again in 2006 when I was freelancing for an online survey business, and they brought in a lead developer/manager who was in love with REST and RoR. I remember seeing the book “Agile Web Development with Rails” on his desk. He’d tried then to explain to me what was so great about REST and Rails, and I didn’t really pay much attention, as what I was doing at that time was developing comprehensive application specifications, and wasn’t really concerning myself with code.

Back in August/September 2009, in the middle of developing a new application, after exploring multiple other options, and delving deep into CouchDB and schema-less databases I found myself finally revisiting Rails for the purpose it was always intended – quickly prototype an application, so you can focus on building it properly once funded.

That’s of course quite a ridiculous assumption, as everyone who built on rails stayed on rails, despite the overhead, and tremendous resource inefficiencies. It seems once you drink the cool aid…

So I picked up a book and started reading. Interestingly enough, my favorite online e-book destination ( Safari Books Online ) did not carry the definitive text on Rails – and nor did Amazon (for Kindle anyway). Not surprising I suppose, as Rails has a somewhat elitist perspective. Needless to say, there are other books, and I found a great one from my favorite publisher ( O’Reilly ).

They mentioned Heroku, which is a cloud-based rails deployment and hosting service, however it seems the book was a bit out of date, as the interface has changed drastically. Digging a bit deeper however I found that Heroku supports a number of Ruby frameworks, and so I did a bit of research.

Frameworks if you aren’t already familiar are somewhat essential tools today for the modern web developer. In most cases, you choose one, or the most popular – but if you are like me, you often want to learn as much as you can.

During the time I was waiting for the “gem” installation, I decided to review Rails.  As a language, Ruby was quite compelling, similar to Python, and thus somewhat familiar.  That said, there’s quite a lot of difference, and you can’t just “read” ruby code without understanding the syntax fully first. Special characters like “@” and “?” would be otherwise very misleading.

Below was my experience in September 2009.  As a result, I have not yet revisited Rails development, though I think once Rails3 is released, I will reconsider.  Stay tuned for a proper review of 3 when it arrives.

RAILS

The pinacle of all web-development frameworks.  First things I noticed:

NOT easy to install on Linux.  Rails is pre-installed in Leopard, and there are Windows installers for it, but installing on Linux takes a few extra manual steps – something that doesn’t quite figure for me, because I can’t imagine developing on anything but Linux (the LAMP developer in me).

You need to modify your PATH manually, but be careful because if you don’t have access to the /usr/lib path, it will install in a .gem path instead (somewhat like how CPAN works for Perl), but instead of just using this as a build directory, everything will be placed there, including binaries, which makes finding them in the first place a pain.

Also, installing anything from gem – is SLOOOOW.  I’ve never used a package manager that provided such little information during it’s discovery of packages, and subsequent installation.  It seems at first that it’s simply not working.  Canceling it will only leave you with a mess of corrupted files/directories.  This is pretty frustrating – seems to be typical of what I’d already experienced with Rails in my past… great when it works (like if you have it pre-installed on OSX or you use apt-get to install it), sucks when it won’t.  Oh yes, and be prepared for a MESS of documentation to be generated… which takes forever.

So far I haven’t written a single piece of code and two hours have passed since I started this project!

Lots more issues with gems, and missing dependencies/libraries.  Bottom line – Ubuntu and Rails do not like each other.

During scaffolding, there is no way to generate anything but primary datatypes.  Fine for simple mindless apps, but for one that requires several joins, scaffolding isn’t much use.  Let’s go and edit the code.

If your application is a single table such as a blog, Rails is a great tool to get you started with little or no effort.  But if you want to create complex relationships between tables, you end up doing just as much work to create schemas for these services as you do anything else.

In the end, I abandoned Rails, and thus I never really completed this article.  Since that time, a lot has changed, I’m not running development for a PHP/Java/Flash team on a B2B web-based software product.  Working in PHP has been VERY limiting however, and I find myself missing the flexibility and robustness of languages like Python and even Ruby.  So, I figured I’d dredge up some old posts, and start re-exploring the different languages available.

Troubleshooting sshd

As per an earlier article on tunneling, I had setup some tunnels to allow secure access to my database behind the firewall. I haven’t however done much development locally in awhile, so I hadn’t used this tunnel. Just recently, I discovered that it wasn’t working anymore. Digging deeper I found that my public-key authentication was breaking somehow for a particular user.

Trying to debug things with “-v” wasn’t giving me useful information, so I thought I’m sure there must be something in the logs and luckily came across this post:

http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/

The long and short of it, was just like Artem, my issue was permissions of the home directory of the authenticating user. A quick fix to that and we were all set.

Thinking about it, now I remember I’d been having permissions issues within my virtual hosts, so I’d “chown -R”‘d them to the apache user. This ended up preventing me from being able to read the home directory(which happened to be the webroot) of the special user I’d created for tunneling and managing webfiles. Silly me.

The big lesson here: like most things on Unix – permissions should always be the first thing to check.

Getting Started with Upstart in Ubuntu

What’s Upstart

Ubuntu has had upstart installed as a replacement for init scripts since as far back as 2006, but it hasn’t yet been really used until the latest beta release of Karmic (Ubuntu 9.10).  Upstart is a more robust services management daemon that allows for things like dependencies, custom events/triggers, pre/post initialiation and resource limitations, amongst other things. You can go check out their home page at http://upstart.ubuntu.com.

I recently upgraded some servers to Karmic, and I decided to write a simple upstart script to start/stop my Django development server when I wanted.

The great thing about upstart is that it actually handles user configurable events, which is a super-powerful feature that I’m not really using yet, but it allows you to create chained initialization and shutdown processes.  Another great feature is the ability to run pre/post initialization tasks.  I’m using this in my example below to ensure the database is sync’d before starting up.

For my django server, I really just needed the bare minimum though of upstart’s features, and from my research into it so far, it looks like upstart is regularly changing, so putting too many directives in my config file might only cause problems later. Karmic is still not yet out of beta, as it is.

So, consider this a super-brief tutorial on how to use upstart for your own tasks, as a replacement for init scripts, or in addition to them (upstart doesn’t interfere with init scripts).

Installing/Using Upstart

Incidentally, if you haven’t got upstart on your system (you’ll know if the command initctl is missing). then you can install it using apt-get or yum depending on what system you are using. Upstart is supposedly defaulted in Fedora as well, but I’ve been Ubuntu-ized for a few years now so I haven’t played with my old friend Red Hat in a while.

Once you have upstart installed, one change you’ll notice right away is that upstart uses .conf files in the /etc/init directory as scripts instead of the ones in /etc/init.d.

You run these scripts by using the “start/stop/status” commands which are shortcuts to “initctl start“, “initctl stop” and “initctl status” accordingly. You can even list all services with “initctl list“, which gives you something more like a Windows Services list with statuses and PIDs.

In my example, I’ll be starting my django server with the command:

$ start django

and stopping it with:

$ stop django

The directives in your .conf files are called “stanzas”, and each type of stanza tells upstart what to do. If upstart doesn’t understand a stanza, it will behave as if the service doesn’t exist.

Pretty easy. So let’s take a look at the file.

Sample Upstart Script


# my upstart django script
# this script will start/stop my django development server
# optional stuff
description "start and stop the django development server"
version "1.0"
author "Jim Kass"


# configuration variables.
# You'll want to change thse as needed
env DJANGO_HOME=/home/django/myproject
env DJANGO_PORT=8000
env DJANGO_HOST=0.0.0.0 # bind to all interfaces

# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork

pre-start script
chdir $DJANGO_HOME
exec /usr/bin/python manage.py syncdb
emit django_starting

end script


script
# My startup script, plain old shell scripting here.
chdir $DJANGO_HOME
exec /usr/bin/python manage.py runserver $DJANGO_HOST:$DJANGO_PORT &
# create a custom event in case we want to chain later
emit django_running
end script

That’s it! You can actually use the shortcut stanza “exec” on a single line. chdir is actually also a stanza, but at this time it doesn’t support variable expansion, so I’ve instead used the script stanza. If you wanted to hard-code all your values and not use variables, your script could be even shorter.

See the wiki/docs here. These docs are for an older version of upstart, and there doesn’t appear to be an updated list, so I had to learn a few things from trial/error. For instance, console logged is not a valid stanza, but console output still is. Your mileage may of course vary.

For reference, the Upstart Stanza Wiki Page has a description of all the stanzas I used, and a lot more.

Upstart can do a LOT more than just start/stop things, you can chain scripts using custom events – you can even fire events manually from initctl (useful for testing things).

As mentioned, if you have directives in your script that upstart doesn’t understand, it will tell you “unknown job:” when you try to run it. As upstart is pretty new and changing frequently, not all “stanza” directives work on all versions. Check docs for your version as needed.

Hope that helps!

My Television Princess

I’m always being asked by Christal to “blog” about her – and as this is mostly a tech blog for me, partially to help me with my own memory issues, and partially to share some of my insights about the tech world with others… I don’t have much opportunity to do that in other places, at least not without sounding too self-interested.

I essentially “left” the entertainment business some 5 or 6 times since I moved here in 1998.  That’s nearly once every other year.  More recently, I finally conceded that digital is more than just another great media format, but is finally at the point of being a viable means of distribution, and the convergence of entertainment and the internet is in process.  I jumped into the digital space, not as a content producer though as I thought I would have, but as a technologist, and a digital enabler… hoping to  leverage the new digital pipelines for distribution and production.

To that end, I owe my renewed love, appreciation and respect of entertainment (and particularly television which is guiding it’s current path) to my lovely Christal.  As a guest at many major television events, including the recent Emmy awards, I’ve become increasingly more comfortable amongst an ever growing pool of the most talented, funny and sexiest people in the world.  The difference between film and television might be the size of paychecks, or the public perception of fame, but in truth – entertainment truly begins and ends with broadcast.

I owe a great debt of gratitude to my television princess, who I continue to love and admire, and who provides me with so much inspiration to want to be a leader in this constantly evolving digital space.

Thank you again!