Saturday, May 4, 2013

Add RTL Support and Web Fonts to Tumblr Posts

ArabicTumblrThis is my technical blog. My personal blog where I write mostly in my native Arabic is hosted on Tumblr which is a nice platform but is really bad in supporting Arabic and other RTL languages. At least that’s my experience.

So finally I got sick of it and decided that I’m gonna fix this with some HTML and CSS magic. Maybe with some help. I did find that Tumblr has some nice features that helps fixing the problem. Let’s see how.

Tumblr lets you modify the HTML and insert additional CSS to your page. You gotta be careful when you’re doing this. At least make a backup of your page before you try new changes.

One nice feature is that you can add {TagsAsClasses} as a CSS class. This will allow Tumblr to read the tags you attach to your post and apply them as a CSS class. I’ll use this as a way of marking the Arabic posts that I’d like to display from Right-to-Left. For every one of these posts, I’ll add the tag “arabic” and then Tumblr will apply the CSS class to that post.

I’ve used a simple theme named Quite Big as my base theme. You’ll find a DIV with the classes “content” and “x-post”. x-post is not the name of a class but rather text-post, photo-post, quote-post, and link-post. One class for each type of post.


Types of Tumblr Posts


You’ll need to find each one of these DIVs and add “{TagsAsClasses}” to its CSS classes.

Wait, where can I get the HTML?

In the Settings section, click on the item at the bottom of the list on the left where you should see your avatar. Next to “Theme”, click “Customize”.
On the left, you’ll find “Edit HTML”.

After you save the modified HTML. While in the “Customize” mode, scroll down to the bottom in the pane on the left. You’ll find a “Add Custom CSS” section. This is where we’ll add a definition of how we want to display the Arabic posts.

{TagsAsClasses} allows us to add a tag to any post and apply it as a CSS class. The name of the CSS class must match the name of the tag. In my case, I chose “arabic”. Here’s the CSS I used.

This will apply the RTL direction, it will align the text to the right, and make the font size a little bit bigger.

How to Use Web Fonts?

Now that I went through the posts and added the “arabic” tag and everything is right to left. I need a good font to really make the blog look beautiful. Nothing pleases me when I’m writing Arabic like the Amiri font. Since it’s available on Google Web Fonts, this makes my task much easier.

First, I import Amiri.css. I go back to the HTML of my pages. Before the very end of the <style> element in the <head> (search for </style> and place the next line right before it):

Then I got back to the additional CSS, and slightly modify the CSS to look like this:

What about the Headers?

I notice the headers need a little bit of a change. They don’t have the right font. So, I go back to the HTML, and find the H3 element for the titles, and change it to look like this:

Then modify the CSS to look like this:

Now, the headers and the body are using Amiri and the header has the right size.

I’ve published the modified HTML file on a GitHub gist if you want to use the same theme. Here is the additional CSS.

Monday, April 29, 2013

How to Ruin Your Technical Session in 10 Easy Steps

This is Gold.

Recently, I’ve attended a developers’ conference and some of the sessions were a model for how to deliver a passionless boring lecture done so nicely that the only thing interrupting was the noise of my snoring. I wanted to sum up few of the great lessons I’ve learnt from these great sessions:

1. Start with the Obligatory Pointless Show of Hands:

Nothing engages the audience more than feeling small when asked “Have you heard of JavaScript?” except feeling inadequate when asked “Did anyone try scaling AngularJS with MongoDB using Chrome Canary on Linux Mint?”. But this feeling of engagement quickly builds up when you completely ignore the results of the quick poll and carry on with your session without the slightest modification. Show-of-hands shows that you are down with the latest tricks in the art of presenting.

2. Speak in Soft Emotionless Monotone:

Developers’ emotions have devolved over the years because of the constant contact with machines. Showing any emotion might be dangerous, and it’s completely unnecessary. Use a soft monotone that makes all the words sound alike.

3. Sit down and Hide behind your Laptop:

You’re a busy person who’s been working all day on your hippy standing desk. Feel comfortable sitting behind your monitor and let your soft voice guide your audience through the slides that need no character.

4. List Facts, not Experiences:

Your audience traveled hundreds, if not thousands, of miles to learn the facts that they could’ve read in a blog post. They just need it in the form of unsorted incoherent list that is difficult to remember and makes no sense. Make sure to deliver it fast enough so that they can break for launch. If you list 20 facts is better than if they can remember 10.

5. Avoid Story lines or Building up to Something Meaningful:

Stories means emotions. Stories have highs and lows. Stories are interesting. Stories are not facts. Stories are coherent. These are all things we’re trying to avoid.

6. Jokes are for Suckers:

It’s very important to put a distance between you and your audience, not just physical distance but emotional as well. You are a delivery vessel for facts, you’re not there to entertain or be memorable.

7. Slides are for Words, the More the Better:

Lifting whole paragraphs and sections from your PhD thesis is an excellent idea especially if it’s a screenshot not text, so later if the audience gets a hold of your slides they can’t copy the text. The goal here is to test the audience’s ability to focus on listening to you and reading the content of the slide at the same time, especially if they don’t match. Make sure to include couple of URLs that has at least two hyphens and one tilde. No URLs shorteners. Don’t forget to refer to the URLs as “important”.

8. The Crowd Loves Your Messy Desktop:

Make sure to minimize all your applications to show your desktop with a stretched picture of your kid riding a dog on a snowmobile which you took last August. Let them try to guess what is this picture by making it difficult to see behind all the icons you have on your desktop including “Yahoo Messenger” and the folder titled “My uncle’s second weddings photos”. Also, remember to leave your Skype on during the session because you don’t want to miss any important messages.

9. Technical Sessions are a Test of the Crowds’ Endurance:

So, the longer the session, the better. A continuous hour that goes on and on and on is good enough, but if you can sneak in few minutes at the end to finish the last 15 slides, that’s okay too.

10. Answering Questions is a Private Discussion:

When a person asks a question, try to answer it in the most private manner possible. Ignore that the person’s voice was too low that no one other than you heard it. Get geeky and make references to acronyms that no one understands. Just make sure that the person who asked the question barely understands the answer, and no one else even understood the question.

These are few tips on how to make your technical session the worst ever. I excel at only few of these, but working on some of the others. I wish you all the luck and look forward to your crappy presentation soon.

Image Credit: TheManBehindTheCart

Thursday, March 28, 2013

Real-Time GIS Using SignalR and Esri's JavaScript API

Everybody loves command centers. We all would love to be Capitan Kirk, setting there seeing information coming in from all over the place, and we can act on it without having to do much work.

The problem with building command centers is that they represent a big unnecessary load on the servers. Command centers now are not like the Star Trek command centers. No, they're hundreds of users connected to your service, each trying to command their own one decision which in aggregate with hundreds of other users form the output of the system.

These hundreds of computers calling the server every few seconds checking if there's an update or not represent a big unnecessary load on the server. What I prefer is to call the server when I know that there's an update, or better, have the server call me, the client, when there's an update.

That's where SignalR comes in.

SignalR is an open source library that let's you build front-end real-time applications using JavaScript (or .NET). On the back-end you'll use .NET.

SignalR was a side project started by two guys; David Fowler and Damian Edwards. The source code is hosted on GitHub. The project got so much support that Microsoft is now supporting it as part of its ASP.NET family even while maintaining it's status as an open source project developed in the open.

Listen to Damian Edwards interviewed by Scott Hanselman about SignalR.
Watch Damian Edwards and Scott Hanselman demo how to use SignalR.

SignalR makes it incredibly simple to add real-time functionality to your application.

It’s simple because it provides you with a way to just call a function on the client-side. Just RPC a function on the client-side.

It’s simple because it your code will work – without you having to change it – with a number of different technologies under the hood.

It starts with WebSockets, and falls back to other technologies if it’s not available.

There are two examples for SignalR you can check out right now: Jabbr which is a chat room service. And ShootR; a space craft shooter game built with HTML5.

SignalR is split into a .NET component on the server side, and a JavaScript component on the client side. Basically, you create a class that inherits from a Hub class and whatever public method you create is now callable from the client side.

The important thing is that you can define client side functions that are also callable from the server side.

We can use this to add real-time capability to an ArcGIS JavaScript API application. Using a sample from the documentation, I've added the real-time capability using a C# class and few modifications to the client side JavaScript.

Here's a video for how the final proof-of-concept looks like:


The code is all up on GitHub.

I was invited to speak at Esri DevSummit 2013 on March 28, 2013. Here are the slides for my talk. They provide few more details.

There's a few book on SignalR out now, you can get here.

If you have any questions, please add a comment below.

Wednesday, March 13, 2013

The Five Stages of Grief over Google Reader Shutdown

Google-Reader-Logo-600x300A quick look on Twitter, you notice how quickly the Internet is going through the five stages of grief over the shutdown of Google Reader.

 

 

Denial

Anger

Bargaining

Depression

Acceptance

Sunday, March 3, 2013

Using Intellisense with Esri’s JavaScript API in Visual Studio

We all love Intellisense in Visual Studio, but with JavaScript is a little difficult to do that given it’s a dynamic language. However, most JavaScript libraries now comes with VSDoc files that provide a way to add intellisense to JavaScript in Visual Studio (and other IDEs).
This post describe how to add the VSDoc files of any JavaScript library to your project in Visual Studio (Some of the images in this post are from here). In this post, I’ll expand on that to add intellisense for the Esri JavaScript API (JSAPI).
First, download the VSDoc file for the JSAPI from here here (direct link to Zip file). The file was released with the 3.1 version of the API, it could be a little outdated. I couldn’t find a newer version of the file. If you do, please share it in the comments.Updated version of the file could be found here. Thanks to Ken Buja who provided the updated file on Esri JSAPI forum.

Visual Studio 2012

Open the Options Dialog
1-OpenOptionsDialog
Under Text Editor > JavaScript > Intellisense > References, switch to Implicit (Web) in the drop down list, and make sure that “~/Scripts/_references.js” is added.
2-PrepareJsReferences
This will tell Visual Studio that in any project, you will place a file named “_references.js” under a folder named “Scripts” at the root of the project, and in that file you will add references to the JavaScript API files with intellisense. You can change the file name or folder to anything you like.
Now, let’s add the _references.js file. Add a new item under the Scripts folder.
3-AddNewItem
Then, name the new file _references.js
4-AddReferencesFile
In the new file, add references to the VSDoc file you included in your project. You can simply drag the file from the Solution Explorer and drop it on to the file.
5-ContentOfReferenceFile
You can see in this file, I’ve added references to jQuery, SignalR, and the JSAPI.
Now, you’ll get intellisense in your JavaScript file.
6-EsriJsApiIntellisenseVS2012

Visual Studio 2010

In Visual Studio 2010, there’s no section in Options to add a reference to the _references.js file. So, you’ll need to add a reference to that file in each file you’re working on.
7-AddingReferenceFileInVS2010
You’ll get the same results.

8-EsriJsApiIntellisenseVS2010 

 Update: I've updated the links to VSDoc file to the latest version.



















Monday, September 17, 2012

Personal Clouds


“The Cloud is coming”. Actually, it’s more like “The cloud is here”. It’s being forced upon us on every platform (Almost every platform, at least, Windows, OSX, iOS, Ubuntu and Android). With the spread of smartphones, the cloud now not only makes sense but is also useful.
Let me go back a step to make a distinction.
There are two meanings for the word “The Cloud”:

  • One is common in IT departments, although not very popular, I assume. Think Amazon Cloud Services, and Windows Azure. We’ll call it the Cloud.
  • The other is common between end users. Think iCloud, SkyDrive and Office Web Apps. This is more like Cloud Services; it’s services that live in the Cloud.
Only an advancement in the first made the second possible. Giant software companies are now building these huge data centers that can be used in a very efficient way. Unlike before, when renting a server meant that you actually were allocated a physical server (or a folder on a server) in a certain data center. Those days, if the machine stopped, or the data center lost power that meant that your web site went offline. Now, your web application is hosted in a Virtual Machine that – along with 1000s or other VMs – form a layer between you and the physical server. Now, the server – or even the data center – can go offline and your application would still continue. Maybe with few minutes of downtime if you were running a single instance of VM.
Another advancement that is directly affecting these cloud services is the spread of smartphones and tablets. These cloud services play one of two roles:

  • Back-end to an application that runs on two different devices and shares state through the cloud. The simplest example is a text editor running on your phone modifying a file on Dropbox. Every time you modify the file, it get synced to your computer where you can continue your edits using a different text editor. These are two different applications running on two different devices, yet they’re sharing the state of the data they’re manipulating.
  • Server-side application available on multiple platforms. Think Evernote. You can access it through your phone, your desktop client, any web browser. You think it’s the same application which technically is not true. There’s a web application, maybe written in Ruby. A Windows client that could written in .NET. An iPhone app written in Objective-C. These are three different application that share state through Evernote’s servers but more importantly they share a lot of backend services like OCR, search, archiving, and other. That’s why you consider it one application. That’s why it’s one application.
In either case (and they’re very similar) the cloud is extremely useful. Being able to move seamlessly from one device to another is incredible and we’re just starting. In few years, we should be able to move from one device to another for a much larger number of applications that we do now. As more applications is built directly to the cloud, compared to now where web applications are modified to include these capabilities.
While the cloud offer a great capability to users, it offers even bigger advantages to big software companies. They now control your digital life. I spent the last five years of my life writing all these tiny tweets, 140-characters at a time, all 36,000+ of them. Now, I can’t get them back. Twitter has sucked them into a void. They won’t let me download them. They won’t let me search them. They won’t let me even browse them. Meanwhile, Twitter is building this profile of my interests and feeding me all these ads about all the silly things I demonstrated that I care about.
I can’t get out of Twitter, I’ve invested five of years into it. I’ve built networks of friends. I need twitter more than they need me, it seems. When you cut off 3rd party developers, or block my favorite desktop client or change the terms of services; all are things I don’t agree of, but not enough to make me leave the service.
Same goes for many other services. After a while, there’s nothing you can do about changes to the service when you don’t agree of them. Google can change Google Reader by shutting down sharing, and force you to use Google+, but you won’t leave. Facebook can change their terms of service or privacy policy, and you would just click “I Accept”. Nothing you could do really.
Let me sum up what I see is the problem with these services in three – not so – brief points:

  • Privacy: your data is not just yours anymore. Your data can be mined, copied, passed to law enforcement, peaked at by bored employees, or stolen by hackers who are now shooting at larger targets.
  • Freedom: you may only run the features and functionality that are available and permitted by the software vendor. If the vendor upgrades the service to include more – or less – features, you have no choice to roll back to another version. If you’re using a feature that only few users like, that feature will likely be removed. Your online petition won’t really help bring it back. You may integrate this software with other services that are permitted by the software vendor. If there’s a service or functionality you’d like but is not available, you can’t easily build your own. You’re being handed fully cooked meals instead of ingredients you can put together to make something new.
  • Competition: these companies that are building full solutions are the ones in a better position to survive the competition. If you’re building a service that does only one thing, (I’m looking at you, Dropbox) you are at a worse position than your competitor whose building two things into their service (to follow on the example, iCloud and SkyDrive). Integration. Windows 8, and the whole family of new Windows products, is built on the promise of integration. Windows on your phone, Windows on your PC, Windows on your tablet, and Windows on your Game console and TV set. Companies that are building two features/things into their service have an incentive to make you use their new shinny third feature even though it’s much worse than the competition. They can integrate it better than the competition. Notice how ‘Files’ are taking a back seat in all these services. There are no files any more. On your phone, there are no files, there are only apps. People think of files are a pain to handle, because there are so many of them and you have to arrange them in folders and remember where you stored them. They are a pain. But files are very important because they allow for mobility of your data. Any application that can read this file is an application that you can move to. If one application does a certain feature that your default application doesn’t do, you can move to it as long as it can read that file format. Some applications use proprietary file formats but eventually open standard file format tend to dominate. With apps, you can’t move from one app to another because there are no files. You’re stuck with that app.
You can look at these problems and think that they’re not very important or that you don’t affect you very much or even think that it’s a natural advancement or how computers work now. I see them as warning signs.
There must be a solution.
I consider the benefits of the cloud and cloud services to be huge. It’s something that you can’t live without once you get used to it. Living off the cloud is not an option.
At its core, the cloud is a computer that is always on running a certain piece of software. Actually it’s some number of computers running each with a specific software. I have a Dropbox computer, a Gmail computer, a twitter computer, and so on. If I can get these pieces of software to run on my machine, and make that machine available online and accessible to my phone and other devices then I would have my own cloud.
What I need is a Virtual Machine, only accessible to me (or any service/person I give and control permission to), that is running a server-side operating system and a software that replaces each service I’m using. It would have an email server, a calendar, a cloud storage service, a synchronization service, a node of social media, a blog, a Wiki, and any other type of cloud service I’m using.
There are alternatives to a lot of the services that any user is using daily. Instead of Blogger, use your own Wordpress. Instead of Gmail, use SmarterMail, Zimbra, or Sendmail. Instead of Dropbox, use Tonido or SparkleShare. Instead of Flickr or Instagram, use OpenPhoto. There are few services that doesn’t have great alternatives but they can be built.
For such proposal to work, two three key issues have to be addressed:
  • Ease of Management: in any cloud service, all you need to manage the service is sign up. You don’t need to worry about updates, maintenance or troubleshooting any problems. Running your own cloud will definitely come a certain level of trouble. Think taking a cab vs. owning a car. It shouldn’t be so much pain. It should be relatively easy at least for techies in the beginning. With all these years of software development experience, it should be possible now to build a piece of software that is possible to troubleshoot by a non-techie. A dashboard with shiny gauges and handles should show status and allow control of these services.
  • Integration: these alternatives, that I’ve listed some of above, are built in isolation but they shouldn’t stay that way. They should integrate to offer a complete solution. Either by bridges that are small pieces of software that makes one service communicate with another without being aware of it, or by all these services adhering to a standard API to perform most common tasks.
  • Mobile Support:one of the main reasons of having a always-available service is to be able to access from your smartphone. Support for smartphones is a must for any cloud service, commercial or personal. This support can be through web or native apps, depending on the kind of service consumed.
Frankly, I don’t know what to make of this idea. I’m certainly not the first to come forward with some sort of proposal for a Personal Cloud. I’m aware of at least one other proposal (by @windley) which can be found here but it’s more of a complete platform for personal clouds that require building a new type of operating system. Promising idea but strikes more as a Computer Science project rather than a piece of software than can be built and used in the near future.
I think this could be a big project that brings together all the pieces of open source projects together in one proposal that stands side by side with current offers from Apple, Microsoft and Google. Not only that it would an alternative, but also it would be good for software and for the benefit of users.

Update: Earlier version of this post didn't included Mobile Support as a key issue to be addressed when building personal clouds.

Wednesday, August 8, 2012

EgyGeeks: on Building an Online Community

A little over two years ago, a group of techies got together for a Skype conversation. Mohamed Meligy tells the story. It was a great talk and we really enjoyed it, he says and I remember.

What started as a group of people “geeking out” on Skype transformed into something that is a little bit more. “Let’s have some sessions where someone tells us about a topic they know”, someone said and it so it was. It continued for a while. There are few things I think I learnt from that phase:

  • It Takes Time: one sessions seems like it wasn’t that good, the next one didn’t have a big audience, don’t worry about it. Just keep going. You’re doing good. Effort + Time + Learn from mistakes = Better Results.
  • An Online Community is Different from an Offline Community: I gave one of these sessions, and it was one of most difficult longest sessions I gave; it was my first online session. When I’m in front of an audience, I keep going and build on their feedback. Start with a joke, they laugh then I can try another, they don’t then it’s information from then on. I can see when they’re bored, when they’re interested, when they’re just lost. I can do some course correction and damage control along the way. In an online session, I don’t have any of that feedback, it’s one long hour of me just talking. They could be rolling on the floor laughing at my jokes, and I wouldn’t know about it. They could be surfing the web, and I’d be thinking “Oh, I’m kicking ass today”. Online communities by their nature are different from offline communities. They’re not offline communities plus the convenience of availability, asynchronous communication, and never ending memory. They look the same, but they’re not the same. Pay attention to that.
  • Lots of Silent Participants: A lot of people will attend and be part of your community and not say anything. Don’t make them feel bad that they’re not participating and don’t make them feel like they have to participate. These are your audience. They are what makes your community possible. If not for them, you’d be just a guy talking. Also, you’re not smarter than them. You just feeling like talking and they don’t. When you get a chance to hear from them, you’ll see that they have a lot to add.
  • Logistics are a Pain: A lot of time went into finding free tools that we can use to hold online meetings. There’s a lot of tools, but you’re looking for a specific set of features that match your needs and you have to give up some of these because none of them have all of what you’re looking for.

Over time, those who are more vocal in their participation wanted to make this online gatherings into a community. EgyGeeks, we would call it, and lots of activities would be part of it.

One activity stood out as: long lasting, easy to start, and kinda cool is podcasting. In the Arab tech world, there’s one podcast that I know of: Dot Net Arabi for the always-delightful Emad Alashi who’s done a great job of maintaining that podcast. He models it after the Hanselmintues podcast for Scott Hanselman. It’s short to-the-point interview with a developer and is strictly about specifics of technology. “You’re here to learn something” is the idea.

We wanted to offer something a bit different. Less of technology specific, or about technology specifics, and more of a community building exercise. Less about “what we do” and more about “how we do it”. There’s a lot of good developers in Egypt. There’s a lot of mediocre developers who can be good if given the chance. But one thing I’m sure of is: there’s a bad software industry in Egypt (and in the Arab world by extent). Wrong practices, bad motivations and incentives, and no meaningful community. (Individual exceptions exists, but they’re still exceptions, and individual). This podcast would be about replacing bad habits with good ones by informing people about what’s out there and how it’s possible, and how it relates to you as a local developer.

One idea that comes to mind when listening to one of these technology podcast is “Well, they work in Silicon valley” or “That’s not how we do it here” or whatever other idea brought to you by the inferiority complex in each of us. But if you start talking to other people, you’ll find that they have the same problems, they’re looking at the same solutions, they’re having the same obstacles, and in your conversations you can remove them. We’re willing to listen and participate of these American podcasts, and communities but not in our own and that should change.

A lot of thinking went into the format, length, style, and other aspects of the podcast. Let me tell you a little bit of what I learnt:

  • Format doesn’t matter, Style does:  Format could be interview, circle of friends talking, host and circle of guests and friends, or else. This is not really that important. What’s important is the style of the conversation: it must be clear, obvious, inviting, to-the-point, easy to follow, and takes into account that there’s an audience. Feel free to use acronyms about the topic you’re talking about, just make sure to explain to the audience what it is. There’s one person listening who got annoyed by your exclusion of him, and will never listen to your podcast again. Don’t make inside jokes, invite everyone to enjoy the conversation as you are.
  • Keep It Short: I love long podcasts, I listen to Windows Weekly and Twit, and they sometime reach two hours per episode. Both great shows and made greater by the length of the show. I advocated a longer show (about an hour), everyone else said no, let’s make it 20-30 minutes. I thought of each episode to be a block of information and complete case about a certain topic, and they thought of the audience. Let me tell you, they were right and I was wrong. People listen to podcasts on their computer, and I listen on my cell phone when outside. People are busy, and I’m not. People dedicate a block of time to listen to a podcast while I multitask. I download the podcast and save it while people just stream it. Consider the audience, and you’re not necessarily representative of them.
  • Release Quickly, Release Often: I’ll use a software phrase to explain this point. Podcasting is like anything else. When you’re starting you don’t know anything about it. There’s no podcasting school. Learn from your mistakes, correct them, next time will be better. Just keep it steady, don’t say “we sucked last time, so I don’t feel like recording this week”. Say “we sucked last time because of _____, so this time we’ll fix it”.
  • Audio Quality, Audio Quality, Audio Quality: You can make a great podcast of background noise and inaudible discussion, but I’m not sure that’s what you’re audience is looking for.
  • Logistics are a Pain: They are. This includes recording, hosting, audio editing, publishing, getting the word out and coordinating a meeting time for people who live in four different time zones that span the earth (literally).

This post comes after following a long Facebook thread on the Egyptian Geeks group by Mohamed “Bashmohandes” Hossam  discussing the idea of starting a podcast of their own which I think is a great idea. There was a discussion of what happened to EgyGeeks podcast. What happened simply is, the Arab Spring. Last EgyGeeks episode was published on January 20, 2011, five days before the revolution in Egypt. Since then, no one was really in the mood to geek out. We certainly weren’t. Things are now coming to a relative clam (I hope they are). We’re not committing to anything yet but before Ramadan we were discussing the idea of coming back. I hope this happens soon.

Friday, January 13, 2012

An App Store for the Rest of Us

I’ve blogged a year ago about App Stores, calling that everybody gets an App Store or as Scott Hanselman tweeted it “There's an App Store for that!”. I had hope for Microsoft to build a better app store that isn’t like Apple’s. So much for my hopes that were crushed when the details of Windows 8’s store was revealed last month. Microsoft promised developers a bigger bite of the apple, bigger than Apple’s. 80% rather than 70%. Your app qualify for the bigger cut if your sales exceed 25,000$.

While that seems generous, I still didn’t like the phrase Microsoft used to describe taking a percentage of your revenue; “Revenue Sharing”.

Microsoft previews the Windows Store

Imagine the government re-labeling taxes as “Revenue Sharing”.

So, Microsoft creates a platform (if we can pass upgrading Windows as creating a new platform), announces that the only way you can get applications of that platform is through their app store and then takes away a percentage out of every single copy sold on that platform.

Imagine you’re a tiny shop building applications for Windows. Now, you want to switch your app that costs 10$ to the new Metro-style UI of Windows 8. How are you going to handle pricing? Are you giving up 3$ to Microsoft and reducing your income by 30% or are you going to raise your price to make room for the new cost and piss off your customers who have seen price increase with no features to justify it which eventually will lead (at least some) customers to jump ship to other products.

Why is a 30% (or even 20%) cut out of every copy sold on Windows Store justified? Is Microsoft not making enough money from every single copy of Windows running on 90% of computers on the planet? Do they really need to have 30% share of the entire software revenue on top of Windows revenue.

What exactly justifies taking a 30% cut? Hosting the application, distributing updates, reviews capabilities, all these doesn’t justify taking a percentage of revenue. No, it’s the monopoly. “You wanna build an app for this platform, then we’ll share revenue”. It’s all part of the Apple-ification of Microsoft. Redmond has been lifting pages out of Apple’s playbook, but this time they’ve gone too far.

Apple has always used monopoly over its platform as a revenue generator. “Use our hardware”, “Use our software”, developers build little tools to add functionality to MacOS only to find Apple copy their ideas in the next release of the operating system and claim credit for it. Microsoft has always been unlike that. They celebrate partnership with other hardware and software vendors. They open up the chance for developers to build tools to cover up for Windows shortcomings. “Live and let live”. Not any more, it seems.

It’s also the “consumerization”. Putting the consumer first. Let business, power users and tech people take a back seat for a bit. The average Joe is the center of attention. He doesn’t want better software or more control, doesn’t care about customization, just make it easier and more shiny even with fewer functionality. Maybe it’s just me, but consumerization ruins general-purpose computation and PCs as we know it today. Consumerization turns PCs and Computers into appliances. One for each function. They deprive me from the ability to create and turn me into a consumer to whatever big companies give me.

I understand that this a lot to blame on an app store but it’s not the new functionality that bothers me. It’s the mentality with which it’s offered. An app store for Windows is a great feature that helps developers offer and distribute their applications. It’s been long over due. But Microsoft is taking the wrong approach to deliver this feature. If I were to build an app store for Windows, I would do the following:

  • Make it a new way to get applications, not the only way: Users should choose to use an app store because it’s better not because it’s the only way. At least a billion PC user in the world, I’m not gonna claim what’s best for them.
  • Developers can host their own apps: If you’re a developer and want to host your own app, that’s fine. An app store is only an entry point to discover all the different app repositories offered by all developers.
  • Recommendations not Control: I believe that it’s important to guide average users to what’s best for them. “You shouldn’t use this applications because it’s buggy”. But not do that by anointing yourself King of the world. When a user purchase an app from a developer, it’s an agreement between the two and the platform vendor has nothing to do with it. I know that this app is buggy but I still would like to use it, it’s performing a function that I really need right now, I don’t want for the developer to comply with your review process. As a platform vendor who cares about how your platform is performing and used, you can use recommendations. “Microsoft doesn’t recommend this app because of performance issues” or “because of privacy issues”, “Please read for more details”. Developers would get an explanation for the recommendation and be able to fix the problem. Microsoft gets to place its recommendation high in the list next to the application description. This recommendation would really affect user’s decision and wouldn’t be restrictive to users who know what they’re doing.
  • Standards, Standards, Standards: For this app store to be really open, and for it offer place for innovation by other software vendors, it has to rely of standards. A standard to how to discover apps, how to install them, license them, and update them. Standards that describe how these different process interact with each other, how two processes implemented by two different vendors can still work together. Microsoft can start by offering this standard and other would join.

It’s a shame really that Microsoft is taking over the software market like this. In times where there are attempts by governments to control the Internet, in more ways than one. It doesn’t help that giant software companies are restricting computers as well.

Thursday, January 12, 2012

Sync Windows Live Writer Posts Between Computers

With all the different PCs between work and home, desktops and laptops, synchronization is becoming very important. I wanted to sync blog drafts between different computers which turned out to be very simple. Unfortunately, Windows Live doesn’t offer a solution out of the box, even though Windows Live Essentials comes with Live Mesh along with Live Writer. It’s a matter of putting two and two together which what I’ll do.

First, change the posts folder of WLW (Windows Live Writer):

1. Open up regedit (in Win7, just type “regedit” into the start menu)

2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer

3. Right click on the “Writer” folder in the left pane and choose New > String Value

4. Name the value PostsDirectory and then double-click on it to edit

a. You can try pointing it to your documents folder, which is normally “C:\Users\<your-username>\Documents\” in Win7

b. Or point it somewhere else. Note that Writer will create two child folders wherever you point it: Drafts and Recent Posts.

The folder I switch to is a folder under the folder I keep synced with Live Mesh. On the other computer, do the same steps. Change the posts folder to the folder you keep synced with Live Mesh. You’ll need to copy your existing posts and drafts from their original location which normally is C:\Users\[User Name]\Documents\My Weblog Posts

Now you can start a post on my computer and finish it on the other. More importantly, you now have a backup of all your drafts on your SkyDrive.

You can, of course, use Dropbox or any other synchronization service to keep the posts in sync.

Saturday, January 7, 2012

Mozilla: Beyond Firefox

Who doesn't already know Firefox? But what other projects is Mozilla working on?

I've taken an interest lately in finding out more about Mozilla. I think it all started with reading some of the “How I got started with Mozilla” stories on the Planet Mozilla feed.

I've always been interested in Mozilla's work. It's not open source applications that they build. Most companies now build some tool and open the source code to everyone. This is a noble effort on their part but I don't think that what open source development is about. It's about “Open” before “Source”. Having a community-driven open development process is the key here. Involve the community in the process designing features, and building them. Invite developers to listen in on your meetings. It's a great learning tool for new developers who can learn about what it's like to work on a team. This is what I really admire about Mozilla, the open process. I'll list later in this post some links on where you can see for yourself what I'm talking about.

Before I talk about all those projects, I want to take a moment to mention the Mozilla manifesto (that I translated to Arabic back in 2009). Take a minute to read it. It might seem a high level goal that is not related to daily operations but reading a post about webOS and Mozilla lately, I watched how it's on everyone's mind. I think it really helps the mozillians stay focused on keeping the Internet open when they measure their decisions against the manifesto.

Firefox, Aurora and Nightly

There was always a nightly build of Firefox that if you search for it you can find an FTP page for it but it wasn’t official. With the new approach of versioning and releasing Firefox, nightly builds of Firefox have an official name “Nightly”. Last year, Mozilla came up with the 3 different names and inspiring logos to make it easier to adopt beta version. Firefox is the stable final release for the masses, Aurora is the beta release, it’s stable but could have few bugs. Nightly is cutting edge and updates every night. I use Nightly and love that there’s a 64 bit version of it. You can get it from Nightly’s page. You can also follow Nightly news on @FirefoxNightly or Tumblr. They post details of the upcoming features. For more details, here’s a complete list of features of Firefox, Aurora and Nightly. Here’s an example of a feature that should land soon in Nightly, the new Home Tab.

Mozilla Labs

Mozilla labs is the home of many great ideas that usually are built as addons to Firefox. Some of these projects “graduate” and become part of Firefox like:

  • Jetpack: the restart-less addons platform.
  • Personas: which provides an easy way to skin Firefox.
  • Sync: the indispensable sync capability to keep your Firefox profile up to date on multiple computers.

Other projects are not so lucky and are not active anymore including:

  • Ubiquity: one of my favorite projects. Task-centric natural-language-based command line that brings web tasks from any web site to your fingertips. It's extensible and builds on web standards (HTML, CSS, and JavaScript).
  • Prism: remember how Microsoft annoyed the heck out of everyone with “Pin a website to taskbar” feature in IE9. Well, before that there was Prism. Run any web app as a desktop application with the help of Firefox.

Meanwhile, a number of projects is always active:

  • Test Pilot: collects usage data and user feedback while maintaining user's privacy.
  • Contacts: centralizes the user's contacts in the browser and gives access to online services when requested and allowed.
  • Skywriter: a web-based code editor.

BrowserID

OpenID was a noble effort to outsource and centralize authentication of all the websites that we deal with everyday in a way that removes the hassle. For so reason, mainly the long ugly un-memorable URL, OpenID didn’t take over the web in the way it was hoped to.

Mozilla is take a shot at this problem with BrowserID. Instead of outsourcing authentication to a third party, BrowserID uses the browser to authenticate users using their email address. You add your address as your browser ID and verify it by clicking a link in an email you receive from the BrowserID service then every site wants to authenticate you can rely on BrowserID for that. Watch the video for a demo:

 

Introducing BrowserID from Mozilla

More info on BrowserID is the introduction post or on Identity at Mozilla page. Here’s a quick tutorial for developers, the demo site from the video. You can follow the development or contribute on Github.

WebFWD

WebFWD (Web Forward) is a new program from Mozilla to support open source projects with mentorship, access to Mozilla global network and infrastructure and resources. If you have an open source project that helps keep the web open, you can qualify for support from Mozilla. Read a brief introduction here or follow the program’s news on their blog or @MozWebFWD or watch some videos.

BigBlueButton is one of the projects participating in Mozilla’s WebFWD. It’s an open source project that enables universities and colleges to deliver high quality learning experience to remote students. Here are some videos showing how BigBlueButton works. It’s open source, download it now.

Mozilla Popcorn

Mozilla Popcorn tries to break videos from a big blob into browse-able element, this is how I see it. Videos, even though they’re everywhere on the web now, are still one element. You press play and watch. You can’t search in a video, you can’t make the video interact with other elements or contents that are related to this video. Popcorn tries to bring the web into video.

Watch the Shakespeare demo to get an idea of what Popcorn can do, it’s awesome (you’ll need a modern browser with HTML5 capabilities). Follow the project’s news on their blog or @PopcornJS. Download a copy, or follow the development on Github.

What Else?

There’s one more project I’d like to talk about, it’s the Boot to Gecko mobile OS. I think it’s a big enough topic that it merits its own post especially I don’t know much about it and would like to do more reading on it. If you have good resources on the topic, please mention them in the comments.

This was a quick tour of the Mozilla projects that really interested me over those past couple of weeks. I’m sure there are much more of them our there. If the list is missing your favorite project, mention it in the comments or blog about it, I’d love to read more about it.

Follow @Firefox or on Facebook or Contribute effort to the organization. Get some Mozilla and Firefox gear or Donate and get a free shirt.