Taking a cue from TIOBE, where you can take Google search results and make them mean anything that you want them to, I decided that I was going to try an experiment and see if I could discern, from Google search results, how likely a programmer for a given language would engage in ass-hattery.
In short, this is the most important programming index you will ever see. And unlike many other indexes I will put my hastily concocted formula up front and center for your enjoyment and ridicule.
The formula is
(“Google search for ‘X rocks’ / ”Google search for ‘X sucks’) * (language score sum / X language score)
I got Google results for PHP, Ruby On Rails, Java, Python, C, C++, Objective-C, C# and JavaScript. I took the language score from Lang Pop. The language popularity values for each of the programming languages is
PHP
Ruby On Rails
Java
Python
C
C++
Objective-C
C#
JavaScript
5591
667
6930
4240
9948
5584
352
429
1572
The sum of all of these is 35313.
To illustrate the formula the Python Programmer Ass-hattery score is 20.6387. ”Python rocks” results are 11,300, “Python sucks” is 4560. So the formula would look like this. (11300 / 4560) * (35313 / 4240). Generally, the higher the score, the more likely you will want them to wear there ass as a hat.
The theory is that the louder one talks compared to their actual popularity the more likely they will engage in ass-hattery.
The results for the First Annual Report on Programmer Ass-hattery are:
It’s math so it can’t be wrong.
Comments proving ass-hattery will either be deleted or ridiculed. This was meant as fun (unlike some other indexes).
So, if you remember from one of my earlier posts I had decided to stop working on mobile applications. There were a number of things that I learned from the experience, many of which you can read about in that blog post. But one of the interesting things that I learned was I learned who I am not.
I learned that while I am tremendously entrepreneurial, I am not an Entrepreneur. Believe me, that was a bitter pill to swallow. It’s tough to be a risk taker by nature but lacking in either aptitude, connections or some mix of that. The people who are proper Entrepreneurs are those who can take an idea, get the funding, find the people and bring that idea to market (not necessarily in that order).
I like to build things and I get my satisfaction from having built that “thing”. Whether it’s writing music, writing software or writing stories, it is the final product from where I most derive my pride. I can take (and have taken) abstract ideas and either built or communicated them in ways that make it easy for people who are on the other side of the spectrum to understand and work with it. I have well over 200 posts on this blog and over 60 videos on YouTube that demonstrate this.
Having now “taken 6 months off” it is time for me to start taking the look for employment seriously again. During that 6 months of “time off” I was working hard building mobile apps and their server-side kin and so I was hardly sitting around drinking Mai Tais.
I’ve done work as a system admin, architect, developer, designer, trainer, training developer, consultant, marketer, evangelist, conference organizer and MC, speaker, author and composer. Some people are the type who strive to be the best at something. In other words, finding a niche and becoming the best in that niche. That is definitely a good way to become successful. But for myself, I am best at doing things that require me to pull from multiple disciplines.
The kind of work I’m looking for is the antithesis of the job postings in my Deleted Items folder. I am really not interested in robo-recruiters. I’m already working with a great one and so I have no interest in cut-and-paste recruitment. If you are doing cut-and-paste recruitment you can’t afford me.
There aren’t many companies that I am averse to, but my preference will lean towards funded, maturing start ups doing interesting things. By “interesting”, I mean something for which there is an actual (or potentially actual) market and you aren’t relying on teenager traffic to pretend to make your company valuable. I truly believe that for most business, even the Internet businesses, value is best determined by whether or not someone is willing to pay for what you’re doing. A well defined monetization strategy is something I am interested in. I am happy to talk to larger organizations (and I am doing so) but the regimented environment of a mature business is one that is more difficult for someone such as my self to successfully navigate.
North Dallas is where I call home (for now). I would consider relocating for the right position, but working remotely with some travel would likely be the best arrangement for me. I’ve done that for most of my career and it has, for the most part, worked well.
If you are in need of someone who knows PHP better than most, can communicate to techies and suits, can blog, do videos, training and speaking and who can build really good server-side software and the infrastructure to run it, I would love to hear from you.
I was originally going to write a blog post about why NginX with FastCGI was faster than Apache with mod_php. I had heard a while ago that NginX running PHP via FastCGI was faster than Apache with mod_php and have heard people swear up and down that it was true. I did a quick test on it a while back and found some corresponding evidence.
Today I wanted to examine it more in depth and see if I could get some good numbers on why this was the case. The problem was that I couldn’t. IIRC, it was for a Magento installation.
To test I did a simple “hello, world” script. Why something simple? Because once you’re in the PHP interpreter there should be no difference in performance. So why not just do a blank page? It’s because I wanted to have some kind of bi-directional communication. The intent was to test the throughput of the web-server, not PHP. So I wanted to be spending as little time in PHP as possible but still test the data transmission.
The baseline tests show the following.
Apache w/ mod_php
Total transferred: 3470000 bytes
HTML transferred: 120000 bytes
Requests per second: 2395.73 [#/sec] (mean)
Time per request: 4.174 [ms] (mean)
Time per request: 0.417 [ms] (mean, across all concurrent requests)
Transfer rate: 811.67 [Kbytes/sec] received
NginX with PHP-FPM
Total transferred: 1590000 bytes
HTML transferred: 120000 bytes
Requests per second: 5166.39 [#/sec] (mean)
Time per request: 1.936 [ms] (mean)
Time per request: 0.194 [ms] (mean, across all concurrent requests)
Transfer rate: 801.82 [Kbytes/sec] received
Apache was able to dish out 2400 requests per second compared with 5200 requests per second on NginX. That was more than I had seen before and so I did an strace -c -f on Apache to see what came up. -c shows cumulative time on system calls, -f follows forks. The result for the top 10?
getcwd? Why? Then I remembered that I had AllowOverride (.htaccess) turned on. So I re-ran the test with AllowOverride set to None.
Total transferred: 3470000 bytes
HTML transferred: 120000 bytes
Requests per second: 5352.41 [#/sec] (mean)
Time per request: 1.868 [ms] (mean)
Time per request: 0.187 [ms] (mean, across all concurrent requests)
Transfer rate: 1813.40 [Kbytes/sec] received
At 5352 requests per second Apache actually was outperforming NginX. But what about if more data was transferred? So I created about 100k of content and tested again.
Apache
Total transferred: 1051720000 bytes
HTML transferred: 1048570000 bytes
Requests per second: 2470.24 [#/sec] (mean)
Time per request: 4.048 [ms] (mean)
Time per request: 0.405 [ms] (mean, across all concurrent requests)
Transfer rate: 253710.79 [Kbytes/sec] received
NginX
Total transferred: 1050040000 bytes
HTML transferred: 1048570000 bytes
Requests per second: 2111.08 [#/sec] (mean)
Time per request: 4.737 [ms] (mean)
Time per request: 0.474 [ms] (mean, across all concurrent requests)
Transfer rate: 216476.53 [Kbytes/sec] received
This time the difference was even greater. This all makes sense. mod_php has PHP embedded in Apache and so it should be faster. If you’re running only PHP on a web server then Apache still seems to be your best bet for performance. And if you are seeing a significant performance difference then you should check if AllowOverride is turned on. If it is, try moving that into httpd.conf and try again.
If you are running mixed content, such as adding CSS, JS and images, then NginX will provide better overall performance but it will not run PHP any faster. It will also respond better to denial of service attacks better, but a CDN is generally better at mitigating that risk.
But if you are running pure PHP content on a given server, Apache seems to still be the best bet for the job.
As much as I dislike country music Kenny Rogers sure got it right there. I left Zend around May of last year, continuing work through June and did some sporadic work on ZendCon 2012 until it came and went. I had left with the purpose of trying to get in on a bit of the mobile action with some simple, but good ideas. To help shore up finances I have also been doing some work for Magento as a trainer and helping with their training curriculum as well as providing some guidance on consulting.
However, the time has come for me to admit defeat. My desire to build a company has been superseded by reality. Some of that reality has been imposed on me, some of it self-imposed, some of it just dumb bad luck.
But admitting defeat is not the same as admitting failure. There is a great deal that I have done over the past 6 months and a great deal that I have learned. Some of that is software related, though a lot is not.
One of the reasons that I started this blog is because I intend to dispense useful information to people that pertains to software. With that in mind I would like to dispense some useful lessons of the past 6 months.
Don’t do it alone
This is probably my biggest mistake. I did everything myself. I could do everything myself. I’m either that good or that arrogant (more likely a combination of both). But I shouldn’t have done it all myself. I really needed to have a partner. You need someone who can be excited about your project when the other is down, someone to fill in your deficiencies and someone keep you on track. You are not competent enough in all areas to do everything yourself. My biggest failure was that I did everything myself. Most of it I did relatively well but since you can’t be highly skilled in all areas it really shows when you are doing something outside of your skill-set.
What I should have done is go to the local PHP user group (headed by Chris Cornutt) and told them what I was doing and see if someone else who was not employed (intentionally or unintentionally) would want a part in it. The entrepreneurial books would say that you need others to validate your ideas. I would say support is more important. You also need someone to be accountable to, to make sure that you stay focused. Doing it alone is VERY difficult to do.
Don’t work from home
if you can. Especially if you have kids. But even if you don’t. If you have kids you need to be incommunicado when you are working. Same thing if you have a wife. It is good to have a wife and children, but if you are working at home they will make demands of you. They’re not evil, they’re just human. Trust me. When your 17-mo. little girl comes into your office and wants to dance on your knee to Pendulum you will not say “Sorry dear, but Daddy is coding.” If you think you’re depressed because nobody is buying your software you will be more depressed by the sadness on her face when you say no. Thankfully, this is something that I did right. Only on a few ocassions did I ask my children to leave me alone.
Be aware of who you are impacting
This one is important. One of the big reasons why our society is so messed up is because we are so %&@#$ self-centered. ”My wife and I aren’t getting along, so I’ll just divorce her and find someone new.” Or “my boss is mean and rude so I won’t do a good job or I’ll just up and leave.” Or “I don’t like what this person stands for so I’ll destroy their character instead of work with them”. Lest you think that I’m point a finger at you, in a general sense I’m pointing a finger at myself as well. I know that I am selfish at heart and so I intentionally have taken steps to make sure that my family comes before me. As a husband and father it is my duty to lead my family. The worst thing a leader can do is take the people they are responsible for and lead them over a cliff for the sake of satisfying pride, arrogance, greed or the desire to change the world for the better. If you make the world a better place but destroy your family and those who depend on you, you have failed. Miserably.
Be mindful of those who depend on you.
Your biggest mistakes will be market-based mistakes
As a software developer we have a tendency to worry about things like “OMG, what happens if we’re successful? Will our system scale? Will it crash?” These are important problems to address, but they are not the most important ones. If you are visible, successful and have some means of generating revenue someone will be willing to finance you. Chances are that you could walk into an investment office somewhere with a chart showing exponential growth, talk to the secretary and say “I have a problem” and someone would be willing to talk with you. Now don’t go into an office for green investment funds if you’re trying to build a bigger drilling platform, but if you’re having scalability issues that can be solved with money and engineering someone should be interested in you. But don’t quote me on that. I never got that far. Plus, I am really good at building high-performance, moderately scalable software so that wasn’t a concern for me . (Moderate means < Facebook, Google, Bing, etc.)
No, your bigger problem is going to be market based. And the problem isn’t that you won’t solve a problem, it’s that people won’t know what kind of problem you’re trying to solve. I’ve read a number of startup books and they all seem to say the same thing. ”Talk to your potential customers.” Except one book. IIRC, that book was “Blue Ocean Strategy” (I think that was it, but I might be wrong). What this book (whichever it was) said was that what customers really want is what they already have but they want it faster and cheaper. You don’t want your customer’s opinions. What you want is to understand their pain. Someone is much more willing to hand over money to you if you are making their pain go away. Just ask me. I’ve had some pretty severe lower back pain for about two years and I have spent GOBS of money trying to get it solved (it’s still there).
The pain does not need to be physical in order for it to be worth alleviating. Remember the movie “Up In The Air” with George Clooney? What did he do? He was hired to fire people nicely. Frankly, the managers should have the balls to do it themselves. But they didn’t want to handle it and so Clooney’s character was paid to “ease the pain” for them. Look around you? What is painful for you? Does someone solve your pain? No? Can you? Yes? You have just found a potential market.
Don’t build something cool
Yeah, you can point to Twitter and Facebook all you want but the fact of the matter is that neither of those could support themselves for years and it was only that their platforms were preferable to others that they were successful. And, quite honestly, I don’t think they are. Twitter changed their usage rules because they couldn’t sustain themselves on the path they had taken. The value Facebook has for me is about the same as if I buy my lunch at McDonald’s once or twice a year. I will grant that they have scale on their side which helps them with their low margins. I guess that makes Facebook the WalMart of social media. :-)
Instead of building something cool, try to explicitly solve a problem or alleviate pain. Who knows how much VC money has been wasted on things that were cool. Know what it is you are selling. Hint; it is not your product. If you are selling software that allows you to have a completely spam-free mailbox you are not selling software that allows you to have a completely spam-free mailbox. You are selling reduced frustration and annoyance.
What you’re building should not be what you’re selling. Sell what people get from buying what you’re building. If you can’t identify that then you don’t have something worth building.
Communicate clearly
This goes hand-in-hand with the previous point. I was looking at my network traffic one day and I saw a lot of traffic coming from one IP address. It turns out that my server was inadvertently taking part in a Smurf attack (which I quickly fixed) but I checked the website on the IP address and it didn’t tell me at all what they did. Turns out that they were a CDN, but it took me a very long time to see what it was that they did. If it were not for the fact that my local gateway wasn’t getting pounded from the attack I wouldn’t have given them a second thought. Now I use them (they have a free CDN account package which is what you are actually reading this blog via), but it took forever to figure out what they did.
The first thing that your customer sees is a precise, short and accurate description of what you do. Notiffi is one of the things I was working on and I worked quite a while on finding the right wording. In the end I chose “Send notifications from blogs, websites and private or public applications to anyone“. Personally, I think that is great because it tells you what it does in a sentence. It tells you exactly what the service does. As developers we try to be as accurate as possible, but we often do that in lieu of brevity. Just take a look at the length of this blog post! If you want to hook someone (and you do) make sure that you have communicated clearly what you are doing. Accuracy can often get in the way of communication.
And if you don’t think it’s possible consider the Twitter feed called leeclowsbeard. Lee Clow is the guy who did Apple’s 1984 and I’m a Mac ads. The man is a freaking ad genius. A friend of mine decided to pretend to be Lee Clow’s beard spouted one piece of advertising wisdom per day on Twitter. He also published a book of the tweets. I bought the book not just because it was for a friend, but because it was damn good. And not only is Lee Clow (the real guy) a fan, but Seth Godin publicly smacked down a bad reviewer on Amazon.
Think your idea can’t be communicated clearly in a single sentence? Wrong. It just means you need to work harder at doing it. My friend proved that.
Or add a few more commas. :-)
Know when to quit
This is the hard one. History is full of examples of people who went down to the wire to become hugely successful. You are probably not going to be one of them. For every person who achieved this there are about 50 thousand who died destitute because they didn’t know when to quit.
I made a couple of miscalculations. I had a Twitter-based application that I had started originally. I had heard some grumblings about how Twitter was acting. I knew some changes were coming but I never expected them to be so comprehensive. I looked at what I had spent almost two months on building and decided that I had to gut about 80% of what I do to ensure compliance with Twitter’s new terms of service.
My second mistake that I made was stopping work on the Twitter app in lieu of a different idea I had that was simpler to build. What I should have done was finished up the app, release it and then start working on the next one. I had not taken into consideration some of the problems I would run into when integrating with some of the technology and some of the approval problems I had. It was a simple app and API and so it should be simple to get it up and running. Right?
When I had started I was saying that if I didn’t have a good idea of where I was going in 6 months then I would need to re-evaluate where I was. Well, it’s six months later and I’m doing some re-evaluating. I’m looking at the dependencies I had on third parties and the amount of work I needed to get done to launch a product and then market it. While the ideas are good and mostly complete I am now at 6 months and a trajectory has not been established. I could go for a few more months and get it launched but there was a point that I was willing to go to and I have now passed it. I could, in my pride, push forward against all odds and make it work. But the strategies I have are for my life, not my business. If my business was my life it would be indicative that my priorities were wrong.
As such, quitting is not so much failure as it is a scouting party returning and finding that such and such a path is blocked. I risked a little to find a good path and found that this path was not suitable. Lesson learned.
Where now?
As disappointing as this is it is not the end. I wrote this blog post in the hopes that you will benefit from my experience of the past several months.
And while there are plenty of things I learned I also did get to build a lot of cool software. I built
A worker queuing system that uses JMS and Apache ActiveMQ as the router, connecting to PHP using FastCGI. In other words I could define queues that PHP would listen on for job processing requests and then provide an asynchronous response. I did this because ActiveMQ supports stomp, but also web sockets. By doing this I could use a system that handled persistent ws:// connections directly to a scalable backend processing system that did bi-directional communication.
A Java-based persistent connection from PHP to the Apple APNS system. The APNS system is like Homer Simpson praying to God. “If you want me to do this, give me no sign.” This system maintained the persistent connection, thereby alleviating Apple’s potential dislike of multiple simultaneous new connections to the APNS system while facilitating multiple push notification origins and managing the notification queue.
As cool as #1 was it was not really what I needed in the end. I really like the concept behind the Zend Server Job Queue in that it uses HTTP to do process jobs. I like this because it allows me to scale my worker queue by adding machines behind a load balancer without the need to modify the application’s configuration. Scalability should be an infrastructure concern and not an application concern. The system I built allowed for that.
I got to build a few mobile apps. Enough to get to know JavaScript a lot better than I used to. But it also taught me that as cool as it is to build front-end stuff I LOVE the backend and I love working with PHP. I would spend weeks building UI components only to spend days on the backend. But the biggest difference was that I was smiling while building the backend instead of cursing the day I was born.
Notiffi took about 8 weeks to build and had around 8000 lines of code split between PHP, JavaScript and some Java. During the same time I was working through a business strategy, doing design (which I eventually contracted out for the website), recording videos, writing documentation and setting up a (mostly) self-managing production environment while also going through the final period of adoption for my three children. As much as it pains be to have to withdraw from this endeavor I am horribly proud of what I did accomplish in such a short period of time.
I actually did an intro video that I’m pretty proud of. My wife had a cold at the time of recording. But it was pretty decent for my first time as a video editor and director. :-)
Download Video | YouTube to MP3
I have also identified several weak points or process inefficiencies in development environments that could really use some work and creative thinking. I started doing some work on some tooling to alleviate this problems but never got to finish them simply due to lack of time. I think that the market is ready for some of these changes but if I went forward on this I would not have learned my lesson.
Finally, once I had decided that it was time for me to stop work I decided to do some coding for fun. There were two things that I worked on.
A tool to use your phone as a stop-motion camera coupled with another tool that would help capture and properly sequence an animation. Almost done with it.
An infrastructure that would do what Twitter should have done, IMHO. Twitter is basically an advertising platform, both for Twitter, Inc. and for its users. I really think they could have been so much more. App.net is a good option, but I don’t think that their business model will ultimately be sustainable, or interesting. So I built a streamable web server using Netty, reused some of the Java FastCGI to allow PHP to handle data processing and communication. Abraham Lincoln used to write letters to his detractors, defending himself, and then throw them away. This is kind of the same thing. I needed to do it to do it.
I’m excited to say that I have an interview with a well-respected company come this Thursday. Having some time away from the corporate world seems to have been helpful for my disposition and it allowed me to explore a number of things that were not in line with my previous job description. In hind sight, it was the right time to leave Zend and try some things on my own. Similarly, it is now the right time to stop what I’ve been doing and change direction.
… unless, of course, you have or know of VC or angel money that would be interested in 6 or 7.2
A few months ago I left a pretty well paying job at Zend to start developing mobile applications. I still do some work for Zend, but most of what I do during the course of the week is building apps for mobile devices on my own and writing music. The first one I started working on is called SkwawkIt. I started it about two months ago and have been working on it for a while. It was based off of some problems I had at Zend getting people to retweet important tweets.
Then I started hearing about changes that Twitter was going to make to their developer rules. After contemplating it for a while I took the step of removing about 2/3 of the functionality. Why? Because what I was hearing was that Twitter wasn’t going to allow applications that competed with their own mobile applications. There were some parts of the app that were acting like a Twitter client and since I am a very small shop who only had a good idea, I did not want to spend several months developing an application only to have Twitter say “nuh uh”.
Then the new rules of the road came out this past week and it turns out that they were worse than I had feared. Not only were they going to be limiting the types of apps, but also API call rates and the like. Because of that I looked at what I was building and have become nervous with even the 1/3 of the app that I was leaving in there. So once again I had to re-evaluate what SkwawkIt was going to look like and if I could keep on going. Considering I had already spent two months working on it I decided to keep it going, but to remove some more features so-as not to run foul of what could be perceived as infractions against the rules of the road. Perhaps the changes aren’t as bad as I fear, but Twitter has introduced a significant amount of uncertainty into their ecosystem. And uncertainty is bad when you are trying to build a business.
So what Twitter is now doing, to their detriment, IMHO, is limiting what third parties can do with their API. What they are basically saying is “quit providing cool ways of interacting with Twitter and build analytics tooling instead.” Poo. Control, that’s what it’s really about.
But how did Twitter become so successful? Were they in control of their success? μὴ γένοιτο, as my Greek professor used to say. Literally, “May it never be!” in the strongest possible terms. It was the third party developers who made use of the Twitter API that made Twitter successful. Those 80% of tweets that originate on Twitter infrastructure would not occur without clients that make it easy to interact with Twitter. For example, I would not be using Twitter if it were not for Tweetdeck.
Why were these third party developers successful? Because Twitter, even if they have the highest genius to employee ratio in the world cannot scratch every itch and solve every problem. And these third party developers started making money by doing that. So what does Twitter do now? They limit them, rather than setting them free.
And this has made a lot of developers mad or, like me, frustrated. Rather than limit me, here is a radical suggestion.
Charge me for usage!
I like having free access to Twitter, but if I am building a paid service that makes Twitter easier to use or solves a problem in some unique way, then it simply a cost of doing business.
For example, if I have a service that someone pays $10 a year for to manage their tweets (this is just a random number) why would I not be willing to pay Twitter 50 cents to be able to post as needed? While 50 cents may not sound like a lot I hear that Twitter has around 1 million apps. Most of those apps are probably not in use, so let’s assume for the sake of argument 25% of them are in use. Let’s also assume that each app has only a thousand users, on average. Given these assumptions, 50 cents per user per app per year comes out to $125 million. That’s not exactly chump change. With Twitter’s current RotR changes they get zero. Which is better?
When it comes to a pie, Twitter seems to be looking for a larger slice of a smaller pie. I would argue that it is in their interest to make the pie as big as possible. The best way to do that is to release the creative juices of hundreds of thousands of developers who use Twitter. Don’t limit us, unleash us! Rather than make us worry about whether you’re going to be a dick about something just charge us for access to the service and let us worry about our own bottom lines. I don’t mind paying some kind of a usage fee if I am making money off of Twitter.
In other words, Twitter, you worry about the infrastructure, API features and basic usage. Let the third party developers figure out how to monetize the system and in turn pay you for the access. You may get less as a percentage but you will have a larger pie and a healthier market.
Dittos for Facebook. You have a problem with monetizing mobile? Provide your own client for basic functionality, but create the infrastructure for creating engaging mobile applications and charge for access to it. I, personally, have a very hard time understanding this fascination with command and control structures in social media. Social media properties work specifically because they are not command and control.
And if the CnC fails, so does the whole thing. Why not introduce competition within your ecosystem and let the best solution to a given problem win? Then your developers are happy, your consumers are happy and you have income that does not rely on advertising. Facebook ads are largely useless and Twitter ads are horribly expensive. With Facebook’s recent stock freefall we are seeing the limitations of advertising as a way to support a social media platform. Twitter is no different.
A social media platform’s user’s are its greatest asset. And people are willing to pay for access to that asset.
It’s a lot less creepy than the analytics that are done to serve up ads, and it keeps in spirit with what social media is all about. Namely that it is the social network, not the backing company, that provides a) the interaction, and b) the content.
Besides simply charging for access is there anything else that Twitter can do? Yes, IMHO. That will be another blog post.
Just a quick post. I’ve been doing some work with Phonegap over the past week, really liking where I was going. One of the reasons was because I was using the Twitter Bootstrap components which was making my stuff look not horrible. Most of the pages were doing OK. While their were definitely slower than native (I have a fairly old Android phone) the performance was quite liveable…
… except for one page.
I was mocking it up and it was doing fine on my desktop (duh!). But then I decided to try running it on my Android phone and weird things were happening. The pages were loading slowly and were at about the limit of what I would be willing to release. The one page that I was referring to has a couple of form fields, some indentions, some list elements and a couple of buttons. It is not horribly complicated. But, my goodness, was it slow.
It was slow to the point that I started thinking about how I was going to write this app in Java and Objective-C. I checked out Appcelerator again. But the things that I wanted to stay away from, namely having to learn new languages, kept on haunting me. I remembered that someone somewhere said that the HTML UI component that Phonegap used was not optimized, but I couldn’t believe it was THAT un-optimized. So I tried running it on my phone’s browser and it ran smoothly. Very smoothly.
Talk about being depressed. So I started removing anything extraneous. I removed JQuery and installed Zepto. Got rid of Bootstrap and started doing my CSS by hand. Moved primary development to XCode (UGH!).
But it started taking me a LOT longer to build out the same things. A lot of this was because Phonegap has a really nice workflow if you can do most of what you need to do on the browser. But getting rid of all of the things I did started introducing other instabilities in the UI.
At this point I hadn’t thought of simply getting rid of Bootstrap on the original codebase and seeing what the difference was. But this afternoon I took my broken code and simply removed the bootstrap.css file. It immediately improved. All of the pages were fast, even the one that was really slow. It was drawing three times a second before. Now it was going just fine. Again, not quite as fast as native, but well within my tolerance.
This is all too bad, really. I really like Bootstrap. I am not a great designer and so being able to use those gentlemen’s work really helped me out. But, alas, when doing work with Phonegap it seems like the overhead is just a little too much.
So what I’m doing now is merging my two codebases. I will be putting in the JQuery stuff back in and merging it with some helper code that I wrote.
With my departure from Zend this week I figured now might be a good time to reflect on the past 5.5 years. I will still be working with Zend as a contractor, most specifically to make sure the ZendCon 2012 content is handled properly along with some other tasks. But I will be spending my time being self-employed, working on mobile applications. There have been a few ideas I’ve had toying around in my head for a while and it’s probably time that I put my money where my mouth is.
I do like working with client/server-like architectures and so I intend to be building apps that have a fair amount of server-side processing to back it up. More details on that to come in the next few months.
I have decided that, for the time being, to use PhoneGap for my frontend development. There are several reasons for this. 1) HTML 5 is at the point where you can create compelling data-driven applications, 2) I didn’t want to have to learn a bunch of new languages/ecosystems to get up and running, 3) I wanted to use my existing skill set. OK, 2 and 3 are about the same, though a little different.
So the question was what to use for the backend development and, to nobody’s surprise I presume, PHP is my chosen way to go.
You might think that “Duh, the Zend guy picked PHP” but that’s not the whole story. When I first started using PHP I didn’t like it at all, but I learned it. My preference was actually Perl and Java. Tried my hand at C but pointers keep messing me up, even to this day. I have no idea why. But I got the call saying that Zend was looking for a consultant and I figured I’d give it a shot. How I got past the interview process, I don’t know. Maybe they were desperate. I liked the language but I was more interested in the challenges that I would have to overcome as a consultant.
But now that my work life is switching gears I have to make the decision again. Do I continue to do work with PHP or do I choose something newer and flashier to get the job done? PHP was my choice and it remains my choice. But why? Here are 10 reasons.
PHP is stupid easy to scale – In the unlikely event that any of my projects go viral I will have the need to scale quickly. PHP does it quite easily due to its shared-nothing architecture. I can drop in more servers and increase my cluster size by orders of magnitude with very little configuration.
I won’t need experts – If the event that my new ventures grow and I need to hire on more programmers I do not need the best and brightest to get the job done. PHP just works, in many cases. If you have an organization that needs to hire the best and brightest you are probably doing it wrong. The best and brightest are expensive, moody and prone to boredom. PHP allows you to set up processes that can allow ordinary programmers do extraordinary things. Very, very few languages can do that.
It is tied to the web – HTTP is an imperfect protocol. But it is prolific, for good reasons, IMHO. PHP is bound directly to HTTP. You can run it in non-HTTP environments but it is built for HTTP. Since my communication will be over HTTP, PHP makes a lot of sense.
When it fails, it doesn’t fail hard – Granted, you can fail spectacularly with PHP, but it probably won’t be PHP’s fault. Because PHP cleans up and starts over for each request, one request will not corrupt another. Other languages need a lot of plumbing to handle that. PHP does it by default.
Frameworks – There are a plethora of frameworks to chose from. While some may consider that a drawback, I consider it a strength. If you need something that supports a complicated, or enterprise-like application you have the likes of Zend Framework or Symfony. If you need something simpler you have Silex or Slim.
Best documentation on the web – Sure it looks like it was stylized by Tim Burton’s Joker but the content is prolific. Every function and method call has some kind of documentation and a great number of functions have tons of examples. Not all of the examples are good, but there are enough of them that you can get moving in the right direction quite easily. The only thing I wished that was different was that you could log in with Twitter or something like that to propose a change. I have enough logins as it is. (Correction, you can log in and edit the docs with a Facebook login). But even so. Best. Documentation. Around.
Tons of blogs – PHP developers love to blog. Notoriety in PHPLand is based largely on how much you share information with other people and lots of people take this to heart.
The PHP Community – This could also be seen as a 7(b). But there is no shortage of people who are willing to help you on IRC, Twitter or a host of other places. You just need to know where to look. Special mention must go to Cal Evans and Michelangelo van Dam who have put up with me and done more for me than I ever could have reciprocated, for various reasons.
It integrates with everything – There are tons of interfaces to third party systems. Some of them are native like MongoDB or Memcache, some of them are PHP-based like Pusher. And that’s not surprising, really. PHP powers a third of the web and is used by banks, transportation, governments with tons of business critical applications. PHP should be a wide open target for anyone attempting to make a play for web-enabled applications.
Dynamic typing – “But how do you know if you’re working with an int or a string?” By using your brain. HTTP does not do typing and so PHP does not do (strong) typing for scalars. Quite frankly, it makes complete sense to do it that way. Want an int? Cast the damn thing and stop complaining. Dynamic typing significantly reduces the amount of code you need to write and error conditions you need to check for.
It plain works – Programmer’s have it wrong. The technical solution is not the end goal. Technology should be an enabler. Do you have a wonderful technical solution that doesn’t solve a problem? Bye, bye. PHP solves problems faster, easier and with a lower cost of ownership than almost anything out there. A lot of that is based on “assumptions” (or shortcuts) that PHP takes to solve a problem. Most often those shortcuts work, and the workarounds are very easy to implement (I’m thinking mainly about strict type checking here).
Now that I’m going out on my own I have to be very careful about where I put my money. Heck, I’ve even given up satellite TV, which, sadly, means no more F1 races this season (though I did find the wonderful The IT Crowd on Netflix). But I’m putting my money where my mouth is, and my mouth is saying that, if you’re doing the web, PHP is where it’s at for at least the next 5 years, if not longer. Beyond the 5-10 year range we don’t really know what programming languages will look like. People will guess and 73.5% of them will get it wrong. So for the foreseeable future, PHP is where it’s at on the web.
<Also, comments will be liberally deleted if you’re going to be an ass about this post />
I posted on Twittera link to an article on CNet about the terms of service for Google Drive. There was a hubbub about this part of the ToS.
“Your Content in our Services: When you upload or otherwise submit content to our Services, you give Google (and those we work with) a worldwide licence to use, host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes that we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content.
The rights that you grant in this licence are for the limited purpose of operating, promoting and improving our Services, and to develop new ones. This licence continues even if you stop using our Services (for example, for a business listing that you have added to Google Maps).”
Later on in the ToS it states
“Some of our Services allow you to submit content. You retain ownership of any intellectual property rights that you hold in that content. In short, what belongs to you stays yours.”
Google says the language is actually standard legalese that gives the company the licensing rights it needs to deliver on services that users’ request.
The way Google keeps documents in its data centers requires the company to obtain a license to “host, store (and) reproduce” the files. If, say, a screenwriter in China uses Google’s services to collaborate on a movie script written in Mandarin with a script editor in Hollywood who only reads English, Google needs the rights for “translations, adaptations or other changes” to allow the two writers to work on the document in different languages and make revisions.
First off, the original ToS.
host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes that we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content
The words that don’t have problems “host, store, communicate”. Words that have problems? “modify, create derivative works, publish, publicly perform, publicly display and distribute”
“Modify” is a problem because copyright applies only to a certain extent. If you modify something based off of another work you can claim ownership if it’s a certain percentage different. Take, for example music (which is where most of my examples will come from). You cannot copyright parts of lyrics, only lyrics as a whole. Same with music. I cannot copyright a chord progression. If Google can modify your content there is a point where you may lose control of it because it is dissimilar enough.
“Create derivative works”. This could be taken like doing a cover of someone’s song. If you’re getting paid, that may not be a bad thing, but you don’t have control over it.
“Publish”. Means, according to Webster “to make generally known, to make public announcement of, to disseminate to the public, to produce or release for distribution; specifically : print, issue the work of (an author)”. This coincides with “publicly perform and display”. In other words, Google can take what you provided as private, make it public and you have no recourse.
And when Google says “you still retain your intellectual property rights” I say “hooey”. If you are a musician and you join a Performing Rights Organization you retain all of your intellectual property. However you lose ALL control of your works. Now in the case of the musician that’s not a bad thing because the PRO also pays you for when people use your music. It may not be much you do get paid and you really do want you stuff out there. However, with Google you lose all of the rights and gain nothing except access to Google’s services for content that you very well may want to keep out of public hands, which is exactly what these ToS allow.
In other words Google’s assurances about intellectual property is moot because while Google will not “own” your content it does have complete control to do whatever they deem necessary. And THAT is the problem and the reason why I won’t be using it any time soon.
On the internet we live our lives in a software as a service environment. I am sure that I have agreed to something somewhere that requires me to bend over and take it like a man. But with so many services we need to be paying more attention to the ToS for various sites and being mindful of what we put there. And perhaps with increased competition organizations will provide ToS that provide the user with more control over their content.
The first step in “not being evil” is restricting your ability to be so.
The major development language for Etsy is PHP. I asked Denker, the continuous deploy framework lead, if it’s cheaper and easier to hire PHP developers. She was a little incredulous: “Oh, no, we don’t necessarily hire PHP developers. PHP is so easy to learn that we can hire any strong programmer.”
Ugh. I didn’t want to write a blog post about this, mostly because I intend to stay away from political issues on this blog. I hate politics and I really hate that send enough money to the Federal government to buy a new car each year so they can spend it on things that get their names on it. I would much rather write about software and music, which is where my passions lie. I dislike the administrative state but begrudgingly accept that some freedoms must be curtailed to ensure a civil society. If you disagree with this you are either a totalitarian or an anarchist. Since you are probably not one the only question is where on the slide do you lie concerning liberty and control. I tend to be more on the liberty side. And while I don’t want to write about things that have political ties, if I don’t write this post I’ll be trying to keep myself from writing it for the rest of the day.
Concerning SOPA and PIPA, I am against both. I am against them primarily because I don’t think that the government should be enlisting private enterprise, large or small, to be its eyes and ears. If you have evidence, bring it to court. Don’t force private organizations to do your dirty work.
But the main reason I’m writing this is not because of SOPA but because of a blog post I read about why the author is a pirate. He claimed that the laws were written to get people like him, which it probably is.
A little background, first. I hold a few copyrights. I’ve written a book on PHP on the IBM i and a book on crazy things to do with PHP. I’ve also release an album and am working on a second, when I have the free time. In other words, I have some skin in the game. Not much, but a little skin.
That blog post pisses me off. Why? He does what a lot of people do nowadays. He dislikes the rules and, with a wave of his hand, declares that they are stupid and that he won’t follow stupid rules. He gives several reasons for this.
Copyright law is broken
He wants to be free to enjoy content however he likes
They’re too expensive
The original artists don’t get enough of the revenue
Pirates actually spend more money on music
I will address each one indiviually
1. Copyright law is broken
Answer: Do you have the right to copy?
2. He wants to be free to enjoy content however he likes
Answer: Do you have the right to copy?
3. They’re too expensive
Answer: Do you have the right to copy?
4. The original artists don’t get enough of the revenue
Answer: Do you have the right to copy?
5. Pirates actually spend more money on music
Answer: Do you have the right to copy?
Notice something? I am quite confident that each of his assertions are completely irrelevant. Quite simply, if you do not own the copyright you do not have the right to copy. He also demonstrates a misunderstanding of what copyright is. I quote (which I am doing legally as quoting like this is what fair use actually is)
Let me give you an example of how copyright is meant to work. If I produce a painting and hang it in a gallery, copyright ensures that no one takes a photo and sells or prints copies. If I produce official copies of my painting and sell them, you are completely free to do whatever you like with your copy. If you want to deface it, you can. If you want to give it to someone as a gift, you can. This is what your money is meant to buy you.
Actually, he misses it completely. With any form of copyright you can do whatever you like to your copy. But what you cannot do is make copies of your copy. This is because, unless the copyright holder has given you permission, you don’t have the right to copy. Regardless of the medium, it is illegal to copy it. When you buy an album, or a movie or a book, you do not own it. You either own the copy or you are being granted a license. You may hate that very little of the money goes back to the artist, but you know what? The artist SOLD their copyright to the label in exchange for the label to spend more money on them than they were worth to promote their crappy band. The label also spent gobs of money to record them in a freaking expensive (and freaking cool) recording studio. Is the label a money grubbing, exploitive enterprise that is looking for a quick buck? Probably. But who owns the copyright? The money grubbing, exploitive enterprise. In other words, NOT YOU!
But isn’t copyright law broken and unable to handle the 21st century? Yes, on the first, no on the second. ALL law is to some extent broken. Capital crimes, tax law, copyright, they are all flawed. But that does not mean they are optional or that they are irrelevant because some new circumstance has come about. Would I like to “own” the music I listen to? Sure. But I don’t really care. I have a music subscription that I pay $10 a month for and I can listen to butt-loads of music as much as I like. OOooooo, I don’t get a physical disk. Who cares? I want to listen to music and I don’t give a crap about some shiny disk. If artists don’t get paid, they won’t write great music unless they have a full-time job and write music in their spare time at 5:00 in the morning like I do.
What it comes down to is that piracy (software, music, movies, whatever) is a problem not so much because it costs money but because people have no problem copying other people’s work without paying (stealing, in the layman’s terms). There is only one question that pirate needs to answer. ”Do I own the rights to copying X”. If the answer is “no”, no other justification is legitimate. Should they have the rights to copy as they see fit? Maybe, maybe not. But the only question that matters is “do they?”
To quote the article,
That is why I pirate: When I buy something, I want to be free to enjoy it however I like. I don’t want to be forced into “borrowing indefinitely” or only being allowed to play a movie through iTunes, on a computer.
To which I respond, “Unless you own the rights to the work it doesn’t matter what you want.”
In other words, suck it up. I gave up piracy 15 years ago when I asked myself these simple questions and my answers came up lacking. And you know what? I survived!!
And heck, most media these days sucks and isn’t worth copying.