Monday, February 13, 2017

Allah is Merciful

Each city offers a different way of life to its residents. Specifically, speaking of leisure activities, some are famous for museums while others come with endless ski slopes with countless opportunities for skiing, tobogganing and similar methods for breaking your ankle. What the residents of such do during summer, I have no idea. They probably while away the summer days putting polish on their skis and waiting for snow.

The city that I live in has, let's see..., markets, food places, cinemas and similar places which are full of noisy people making, er, noise. Don't like noise. Me no go there.

What else is there for me to utilize to unwind from the tedium of work and recharge the chargeables?

I tried a number of different sports but am just too lazy to be any good at any. Until I found golf, that is. One doesn't need to be good at it nor does one need to co-ordinate with a dozens other guys to set up a game. At the most, a couple of other dudes who similarly shy away from noisy places are good enough. On the other hand, golf can be enjoyed alone as well. Some of the time I do prefer to go alone, primarily so that no one is there to criticize my lousy shots or my foul language.

A couple of hours of strolling through a manicured lawn, with no phones ringing nor any cars honking, is good enough to allow me to face another week of, well, noisy people. Detoxing from high, or even low, stress is a necessity which not everyone gets to do.

Imagine, if you will, myself on the golf course, walking along and looking around casually. Yes, I look around a lot to see where the dratted ball went. Want to make something of it?

There, that sets up the stage.

Yesterday, I was out with a couple of golf-buddies. Between the three of us, we lost 8 balls and had a combined score of 350. Ok, 370.

Along one of the fairways was one of the groundskeepers, trimming the hedges. As is my wont, when I walked by him I greeted him with my customary: "Salam, Chacha (Uncle) How are you?". With a great big smile on his face, he replied: "Allah is merciful. I am doing just fine."

What a great splash of reality and of forcing one to face a completely different perspective. Here is this old man who has toiled for forty or fifty years, working out in the open with his sun-hardened skin in his threadbare clothes. He is lucky on the days when he has enough to feed himself and his family. The concepts of weekend, stress, leisure, career and retirement planning are totally alien to his way of life. Yet, he is content with his life. He is content with a neatly trimmed bush. He is content with what he has today.

I am sure that he has problems enough and heartbreaks enough. Perhaps he envied me. Perhaps he is deep in debt and trying to work it off. Maybe he has children who make him laugh and cry. But despite it all, despite his not being a king with a flock of courtiers nor a media mogul with extended bank accounts in a dozen countries, despite everything, he is content.

How many of us honestly say: "I am good, Allah is merciful to me"?

Something to think about.

Monday, May 04, 2015

The 1% Target

I don't like the government.

There are many things that I do not like about it. Perhaps some of you share some of my dislikes, perhaps some of you have other things that not as per your liking. If so, go and write about it yourself; this is my blog.

What is there about it specifically that I don't like? I promise I'll get to it. Eventually.

Consider, if you will, the various people that you see when you go around town in a typical day. There are shop keepers selling everything from liquid soap to bulldozers, from BMW's to frozen chicken sandwiches, from plastic toys (guaranteed to break the moment your child unwraps them) to cats of questionable pedigree. The shops come in all sizes and shapes; along with a plethora of advertising to get you to buy from them.

The retail outlet buys from middlemen or, sometimes, from manufacturers. The producers have these great big factories with a legion toiling away to produce the goods (why does that raise an image of dwarves under mountains?) all the way down to tiny, dark rooms with single people assembling, weaving or employing whatever manner to put together the stuff that you buy.

Then there are people who grow grains and pineapples. There are those who dive for oysters - although no one actually does that any more; they grow oysters in industrial quantities in huge ponds. There are those who extract oils from the ground and those who work the mines (no, not dwarves).

There are those like myself who sit in front of computers and write software that you use to balance your cheque books and to crush candies (as if we don't waste enough of our lives).

There are teachers and firemen, ditch diggers and bankers, pilots and people who wash the tires on the airplanes (whatever that profession is called). I even saw an airport security guy whose job in life is to sniff shoes. It's a living, I suppose.

People, lots of people, doing lots of work. There are those who employ others while they sit back. Although, if you think about it, they worked long and hard to make the money which now allows them to sit back (not counting those who stole it or married into it).

As I said, a whole lot of people. They have two things in common. Yes, they have other things in common, but for the purpose of this post, in case you were wondering, there are two.

Firstly, they work to make money. Secondly, the government takes away a portion. Ostensibly, this is to run the machinery of government itself which, as you see, is completely circular logic. Let's assume that the government employees do not use your tax money to buy villas on some island in the Caribbean or flat screen HD TV's to put into those villas. Yeah, let's just assume that.

The original taxation was the tithe to put food on the king's table and for the gentry to buy silk. Some of the tax went to pay the army to raid other nations for the silk that they had and to defend themselves from raiders coming after their silk. There we go into circular logic again.

The town volunteer firemen would go to the aid of only those who had paid the fire tax till someone decided to make the fire tax universal. This was actually so that the firemen would not waste a trip to a defaulter's house.

Custom duty started with port officials in England taking money from merchants importing wine from France. That annoyed the merchants who asked why they should start giving money instead of taking it to get people drunk. The reply they got was: This is your customary duty to the king. And thus, history was made.

Today, we have the Tax man. He doesn't earn for himself. He produces nothing. He provides no service. All he does is to take a part of the money that you worked for. All so that the tax collected pays for his salary. No, that money doesn't build roads; there's a separate tax for that.

Part of the money pays for services that the government does provide: police, army, and I'm trying to think of more.

So, let's have another assumption here that the tax that the government takes is (partially) used to provide services.

How much does the government need? A budget is prepared each year with expected tax to be collected and amount to be spent. Adding a bunch of obvious assumptions, let's accept the budget. Let's just say that X amount is needed to meet the expenses. Add another amount for emergencies, another for reserves and another for "miscellaneous" and we arrive at an amount of Y.

Now, the point of this post is that X and Y are amounts. You can call them figures or whatever, it all means the same; it is a number (with lots of zeroes).

On the other hand, when you import crude from the Middle East, or when you sell a pencil, or when you get your pay check, the government does not deduct an amount, instead, it deducts a percentage. How did the amount get converted into a percentage? That's easy enough to answer: They carried out a lot of calculations after putting in a horrendous amount of assumptions (I'm so tired of that word) to come up with the percentage that should be taxed when a bottle of perfume (no, not wine) is imported from France.

At the end of each quarter and financial year, the same bunch of people sit down to figure out which assumptions were missed or just plain wrong, and what we have is called a "shortfall". This shortfall is added to the calculations for the next year's budget and the whole circus starts again.

Here is what I propose: Make those tax men work. No, not the army nor the street cleaners nor the lamp lighters; they already work. I mean the tax men. They have the responsibility to collect taxes, so make them responsible for generating the amount. Plus, make it the amount and not the percentage.

The key difference here is that if an amount of 100 is earmarked as that to be collected from those who import rubber toy dogs from China, make the tax men responsible that enough toy dogs are imported to allow collection of that amount of 100. With the percentage collection, he doesn't really care if the import goes up or down.

The tax man who is given the target to collect the amount of 100 from people receiving their salary should also be given the target to ensure that enough people are employed to gather that amount from. How? It's my job and my responsibility to deliver a piece of code on time. If the tax man doesn't know how to do his job, well, can anyone spell "incompetent"? Here's a suggestion, lower corporate taxes for companies employing more people so that more salary tax is collected. Here's another: Start advertising on the benefits of having a companion for children that doesn't need to be fed to increase the import of toy dogs. In other words: Go do your job!

And so on, all the way down the line from import and manufacture to retailers and lawyers.

Here's the second part of my suggestion, which is an obvious part of the above: Give the tax man a reward for achieving his amount target; that's how the private sector works where factory workers get a bonus when the factory does well.

Now for my bombshell: We are settled that it is the amount and not the percentage that is of importance here. As of today the government needs that figure that we called X, Make that the baseline and from next year on (even after adding inflation) go after X plus a margin. What is this margin and what do we do with it? That's the whole beauty of my proposal. We throw away the margin in the subsequent year's tax by lowering the percentage of tax. Let's say the for every 3% extra margin of tax collected, the tax percentage for that item is dropped by 1%. The result than becomes obvious also: Lower taxes means cheaper goods, cheaper toy dogs. The tax man should like this idea also. When the percentage goes down with the amount going up, the Audi that he buys would cost less; the price would be the same but the tax and hence the total amount would be less.

The tax man then gets a single target: For the area that he collects tax from, the area that he is responsible for collecting the 100 amount from, bring the tax percentage down to 1%. The first department that does it, everyone employee gets an X Box.

And this, ladies and gentlemen, is why I will never be an economist; I have scary ideas. I have ideas that rock just too many boats. A 1% tax? What an idiot.

Tuesday, November 25, 2014

Advantages of VoIP PBXes?

Talk about future-proofing! The designs that Mr. Bell produced in 1876 survived for close to 140 years with hardly any changes. There were adaptations and refinements aplenty by legions of engineers and companies around the globe but those were so minor in the schemes of things that they hardly matter. The switches were reduced in size and changed from mechanisms driven by electro-magnets to capacitors and then to integrated chips. The inter-exchange connections changed from copper to fibre and world-circling satellites. Minor changes these, of hardly any consequence. The handset retained its shape and functionality, although the rotary dial did manage to get replaced by buttons.
The revolution came with mobile phones using time division multiplexing for managing cellular bandwidth and lots of other technical jargon that I don't think copy/pasting from various web pages would add much value to the gist of this post.
Cellular phones have - as yet - not changed the legacy systems; those that are called fixed or land-line phones. These shall remain pretty much unchanged in the near future or at least till everyone replaces them with Star Trek style communicators.
I don't have to be particularly old to remember the days when offices did not have extensions but each set was connected to its own unique line stretching all the way to the phone company.
The engineering refinements boon was allowing a complete exchange to fit within a single shelf and the Private Branch Exchange (yes, that's what the abbreviation stands for) was born. Suddenly, everyone wanted one so went out and bought one. No business, hotel or school could operate without one. The advantages of a local exchange for a location, or even spread out geographically, can not be argued against.
The revolutions to the PBX design came with the invention of the PC-based exchange and later with IP telephony. These offered unparalleled ease of use and the ability to quickly implement changes.
The differences to analogue and details of operation of Voice over IP are many. But, when all is said and done, you still pick up the familiar handset and press the same buttons to dial. (When no one is around, I try speaking to my phone to dial various numbers but it always replies that it doesn't know the current time on Mars.)
VoIP PBXes have two key features: First, they convert sounds to and from data packets, and secondly, can connect to other similar exchanges not via the lines coming from the phone company, but over the Internet (or leased line).
They save on call charges and phone wiring, as well as being scalable and easy to manage. The perfect fit for businesses.
Being quite enamoured with VoIP (read: geek), I once connected my mobile phone to a software-based PBX so any number dialled from the phone would place a call by switching it to a second software PBX, then to a VoIP provided by my phone company, then to PSTN lines to finally land at my other land-line phone. (Say what you will, I still think that was pretty cool.)
When the time came for me to evaluate and obtain a PBX for the company that I worked for, I truly was leaning heavily towards a VoIP solution and tried every excuse to justify it to myself. In the end, I decided against it and went with a non-VoIP digital PBX.
The reasons for not selecting a VoIP solution were based on the traditional reasons quoted in favour of doing so. Let's go over them one by one.

Ease of Installation

This includes installation not just of the PBX itself, but the wiring and the sets. For both types, pretty much the same types of screws are used to nail it to any handy surface, the same ducts are used to pull the cables and the same snickity sound when you plug the handset into the wall. I can't say about the PBX in your office that perhaps fell off a truck and needed a doctorate in engineering to configure, but mine came with a nifty program for Windows that allowed me to make it do everything but the dishes.

Free calls to branch offices

Yes, I'll give you that. On the other hand, I didn't have a branch office. And if I did, I could have installed an IP trunk card in it to achieve the same.

Cost saving over VoIP providers

This changes from provider to provider in each country. I only know the rates of my VoIP and PSTN providers; the rates are identical when calling other land-line or cellular phones.

Eliminate phone wiring

I have never been able to quite understand why this is quoted as an advantage. Firstly, the sets don't connect over WiFi (well, some do), but anyway, secondly, Ethernet cabling is triple the cost of traditional phone cables even without adding the cost of routers and switches.

Eliminate vendor lock in

Non-VoIP PBXes use an extra pair of wires to provide features to handsets such as smart-button programming. The PBX recommends which handsets are compatible. Sets from other vendors would probably not be. However, this was the key reason for not choosing a VoIP PBX; the handsets with displays and extra buttons are expensive - although the VoIP versions were even more so. On the other hand, within the office were a large number of positions where feature sets were not to be installed. Simple handsets - such as the ones in homes - sell for $25 dollars while the propriety sets start from $100. As mentioned, the VoIP versions are slightly more expensive starting from about $120.
A simple observation on how people use their office phones shows that 99% don't know - and refuse to learn - how to program the quick dial buttons while the other 1% forget the latest programming that they did and so everyone keeps a printed list of extension numbers posted on their desks and dial number manually.
In any case, just multiply the $75 difference in the handset cost by the number of users in your company to see the effect of this 'cost saving'.

Scalability

The non-VoIP PBXes go up to a few hundred external and internal connections. A better question is: How many external and internal connections are your requirement?

Better customer service

Can you really increase productivity and service to your customer if you can integrate your PBX to your computer? From experience of call centres, my answer is an absolute yes. On the other hand, if your company doesn't have a call centre then this becomes a moot point.

Add features

The feature list normally quoted is the same as that which I was getting with a non-VoIP PBX. Look closely in your PBX's manual, you probably have it too.

SIP phones are easier to use

Again, a definite yes. User do not need to learn key combinations as they get a GUI on their PC for setting up conference calls, etc. Do note that this means using your PC as a device and a headset. My users (other than the call centre ones) wanted a phone set on the table. Perhaps all of your users are more comfortable with headsets, I can't say.

Conclusion

Don't get me wrong; I love to be on the bleeding edge of technology, but when that means using corporate funds to scratch that itch without my users getting any benefit, that is what I do not agree with.
When looking at call costs all the other features could be easily discounted with in the argument for and against VoIP PBXes until the recent past when most countries did away with inter-city call costs and brought them down to the same as the cost of a local call. International call costs are still high (except for among some countries) but that still doesn't make a case for a VoIP PBX as the same can be achieved by adding a SIP trunk card to your PBX.

Tuesday, June 10, 2014

Tips for a great resume

Don't, do not, I repeat (just in case you didn't get it) do NOT search for tips on how to write a great resume.

For people who lack in common sense - and there seems to be a fair share of them - I do recommend searching for tips for a "good" resume. Here are a few: Fix typos, do not use buzzwords that you do not know the meaning of, include relevant information and leave out your favourite eating places. See? Common sense tips.

Sites on the Net offer advice ranging from the motif of the paper that you use to industry happenings that you should include. If you are new in the job market such tips serve only to create a mish mash document that I wrinkle my nose at and store in permanent file (the trash can).

On a more serious note, each person who reads your resume has his/her own preferences; some want details while others do not. Obviously, one can not write individualized documents unless one is in serious lack of a life. On the other hand, industry specific ones is something that can and should be managed. If you are applying to a news agency then items / job experience should be highlighted or moved up relating to them. Those same may or may not (probably not) be the same if you are applying to a software house. You are the applicant here, try to realize this. You are the one who is applying, so spend a few minutes making your resume more relevant (read: interesting) to the person who would be reading it there.

Leave out smiley faces. No, no one other than you finds them cute. Smiley faces are annoying.

You will get an interview if relevant information has been included in complete form. Unfortunately, you'll also get called if not, but only if the interviewer has been "asked" to call you. So, there, you've already alienated him (or her, to be PC). Do yourself the favour of not making your position worse by leaving out important pieces of information, such as the dates / durations of previous experience, or leaving in a bucketful of typographical mistakes.

Another tip: Lie consistently. Eh, what? You read it right. We all lie, the little white ones are still lies by any other name. If someone took a week-long course in skiing a decade back, he sticks it in. Makes the resume that bit fatter. The reader knows it, and politely doesn't mention it. On the other hand, putting in knowledge / experience of things that you have no idea of, is a deal breaker. I'm reminded of a person who added Hindi to language skills. When asked, he said that even though he doesn't actually know it, it being a lot like Urdu should / could / may be considered under some circumstances. Ahem!

So. In conclusion. What tips am I giving about taking / not taking tips? Only the one thing: tips are guidelines to help you, not templates for you to copy blindly.

And just a quick note on cover notes: If you add in it that you want to work for a progressive, industry leading organization like mine, I am going to ask you what you know about my company. If you then admit that you haven't the foggiest, don't sit by the phone waiting for me to call you.

Friday, January 10, 2014

Resizing Navigation Bars on Pages

I normally do not blogs on scripting. Yes, I am well aware that I am not the most prolific blogger on the planet to begin with. Whatever the view on that, here's a scripting tip / blog on website design.

Site / Page Designs That The Designer Really Loves

My common gripe with web page designers is that they love their designs too much; at the cost of functionality. I am of the view that most site visitors are more interested in the content than in the shades of colors applied to frame edges. I guess I'll have to agree to disagree. (It's still a stupid design.)

To be more specific, the designs that I am talking about are those where the top navigation bar fills almost the entire page with the content hidden at the bottom somewhere with the assumption that the user should utilize the scroll wheel on the mouse otherwise it might rust.

Me, I'd rather see some content. So, here's a simple technique. This allows for huge (ugly) header area on the page as well as allowing you to keep a small tidy navigation bar that is always visible even after you scroll down.

For an example, look at the navigation bar on Google+. As you scroll the page, the bar shrinks to a modest size.

The HTML Page

Here's the code to the HTML. You know that this uses JQuery. If you are not familiar with JQuery, oh, well...


<html>
<head>
<title>Expanding Menu</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="scripts.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css" />

</head>

<body>
<div id="menubar">
<img id="logo" src="Logo.gif" />
<div id="menuitems">
<a href="#" class="menuitem">Menu 1</a>
<a href="#" class="menuitem">Menu 2</a>
<a href="#" class="menuitem">Menu 3</a>
<a href="#" class="menuitem">Menu 4</a>
</div> <!-- End of menu items div -->
</div> <!-- End of menu bar div -->

<div id="content">
<h1>Heading</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce egestas et augue sit amet pretium. Aliquam non turpis quis velit venenatis dignissim. Vivamus a ipsum tempor, dignissim nisi sit amet, feugiat felis. In a tortor quam. Pellentesque imperdiet augue at rutrum feugiat. Integer a diam id sem euismod pulvinar vel a mi. Ut lacinia tincidunt tortor, a facilisis purus hendrerit sed. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla accumsan lacus sed leo laoreet facilisis vitae et neque.</p>

<p>Donec auctor cursus purus, a commodo urna aliquet eget. Morbi malesuada hendrerit dui, condimentum tempor ante tempor eget. Nam nisi nisi, tristique faucibus mollis sed, ultricies sed tellus. Suspendisse lacinia felis vitae justo tincidunt, sed placerat nulla viverra. Aliquam commodo odio a lectus tristique malesuada. Quisque cursus dignissim lorem euismod accumsan. Suspendisse at nunc at risus molestie volutpat nec posuere massa. Curabitur sed ullamcorper odio. Quisque id euismod nunc. Nulla facilisi. Sed faucibus mauris vitae eros fringilla congue. Donec porta felis vitae vulputate fermentum. Mauris fermentum est quis est consequat, id egestas mi auctor. Cras non diam purus. Duis fringilla quam enim, sed auctor mauris lobortis ac.</p>

<p>Vestibulum blandit nibh a massa venenatis, nec condimentum arcu porttitor. Pellentesque dictum pretium sem in auctor. Mauris eget arcu eu lorem hendrerit fermentum. Sed ipsum turpis, mollis vitae dignissim sollicitudin, vulputate in metus. Praesent euismod felis eget fermentum blandit. Aenean fermentum viverra fermentum. Mauris sed libero nulla.</p>

<p>Vestibulum eget nulla nibh. Integer vitae libero id mauris porta faucibus. Mauris vitae arcu urna. Suspendisse suscipit cursus lorem, a facilisis sem fermentum eu. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc et accumsan erat. In hac habitasse platea dictumst. In vitae felis dictum, placerat dolor eget, accumsan magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque in vehicula dolor. Fusce nunc ligula, lacinia at odio eu, porttitor tincidunt risus. Donec porttitor odio et leo feugiat placerat. Vivamus molestie quis dolor bibendum sodales. Sed luctus ullamcorper ante, quis porta turpis.</p>

<p>Nullam pretium, dui vitae facilisis viverra, dolor libero rutrum justo, a pellentesque purus sapien ac quam. Sed dapibus, neque vel adipiscing pellentesque, justo erat ultricies orci, blandit posuere metus turpis ac nulla. Praesent at ligula risus. Phasellus vitae porta lacus. Fusce vestibulum suscipit tincidunt. In sit amet nisl condimentum, euismod velit vitae, mollis nulla. Phasellus lectus elit, hendrerit nec arcu quis, consequat consectetur odio. Mauris in urna mauris. Sed lacinia tincidunt dignissim. Cras et rhoncus nulla. Etiam id malesuada eros. Donec eu velit ultricies, auctor felis vitae, vestibulum libero. Mauris tellus lorem, congue in quam ut, tempus tempor urna. Pellentesque varius cursus erat, nec malesuada elit gravida ac. Aliquam ut tellus id lorem suscipit laoreet.</p>

<h1>Heading 2</h1>
<p>Vestibulum blandit nibh a massa venenatis, nec condimentum arcu porttitor. Pellentesque dictum pretium sem in auctor. Mauris eget arcu eu lorem hendrerit fermentum. Sed ipsum turpis, mollis vitae dignissim sollicitudin, vulputate in metus. Praesent euismod felis eget fermentum blandit. Aenean fermentum viverra fermentum. Mauris sed libero nulla.</p>

<p>Vestibulum eget nulla nibh. Integer vitae libero id mauris porta faucibus. Mauris vitae arcu urna. Suspendisse suscipit cursus lorem, a facilisis sem fermentum eu. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc et accumsan erat. In hac habitasse platea dictumst. In vitae felis dictum, placerat dolor eget, accumsan magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque in vehicula dolor. Fusce nunc ligula, lacinia at odio eu, porttitor tincidunt risus. Donec porttitor odio et leo feugiat placerat. Vivamus molestie quis dolor bibendum sodales. Sed luctus ullamcorper ante, quis porta turpis.</p>

<p>Nullam pretium, dui vitae facilisis viverra, dolor libero rutrum justo, a pellentesque purus sapien ac quam. Sed dapibus, neque vel adipiscing pellentesque, justo erat ultricies orci, blandit posuere metus turpis ac nulla. Praesent at ligula risus. Phasellus vitae porta lacus. Fusce vestibulum suscipit tincidunt. In sit amet nisl condimentum, euismod velit vitae, mollis nulla. Phasellus lectus elit, hendrerit nec arcu quis, consequat consectetur odio. Mauris in urna mauris. Sed lacinia tincidunt dignissim. Cras et rhoncus nulla. Etiam id malesuada eros. Donec eu velit ultricies, auctor felis vitae, vestibulum libero. Mauris tellus lorem, congue in quam ut, tempus tempor urna. Pellentesque varius cursus erat, nec malesuada elit gravida ac. Aliquam ut tellus id lorem suscipit laoreet.</p>

<h1>Heading 3</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce egestas et augue sit amet pretium. Aliquam non turpis quis velit venenatis dignissim. Vivamus a ipsum tempor, dignissim nisi sit amet, feugiat felis. In a tortor quam. Pellentesque imperdiet augue at rutrum feugiat. Integer a diam id sem euismod pulvinar vel a mi. Ut lacinia tincidunt tortor, a facilisis purus hendrerit sed. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla accumsan lacus sed leo laoreet facilisis vitae et neque.</p>

<p>Donec auctor cursus purus, a commodo urna aliquet eget. Morbi malesuada hendrerit dui, condimentum tempor ante tempor eget. Nam nisi nisi, tristique faucibus mollis sed, ultricies sed tellus. Suspendisse lacinia felis vitae justo tincidunt, sed placerat nulla viverra. Aliquam commodo odio a lectus tristique malesuada. Quisque cursus dignissim lorem euismod accumsan. Suspendisse at nunc at risus molestie volutpat nec posuere massa. Curabitur sed ullamcorper odio. Quisque id euismod nunc. Nulla facilisi. Sed faucibus mauris vitae eros fringilla congue. Donec porta felis vitae vulputate fermentum. Mauris fermentum est quis est consequat, id egestas mi auctor. Cras non diam purus. Duis fringilla quam enim, sed auctor mauris lobortis ac.</p>

<p>Vestibulum blandit nibh a massa venenatis, nec condimentum arcu porttitor. Pellentesque dictum pretium sem in auctor. Mauris eget arcu eu lorem hendrerit fermentum. Sed ipsum turpis, mollis vitae dignissim sollicitudin, vulputate in metus. Praesent euismod felis eget fermentum blandit. Aenean fermentum viverra fermentum. Mauris sed libero nulla.</p>

</div> <!-- End of content div -->
</body>
</html>

The Content div is just fleshed out a bit to allow scrolling to work.

Of interest here is only the div named "menubar". This contains two further div's so that we can see separate but related effects.

The first div contains the page logo while the second contains navigation links. Further div's may be added here with separate behaviors, such as hiding when the page is scrolled.

Note the use of id's and classes. This is simply to differentiate single versus multiple items that would be effected.


The CSS

The CSS for the menu follows:


@CHARSET "ISO-8859-1";
#menubar{
 width: 100%;
 background-color: black;
 padding-bottom: 20px;
 position: fixed;
 opacity: 0.99;
 top: 0;
 left: 0;
 z-index: 1;
}

#menubar.compact{
 height: 50px;
}

#menuitems{
 margin-left: 500px;
 margin-top: 60px;
/* transition-duration: 300;*/
}

#menuitems.compact{
 margin-left: 200px;
 margin-top: 20px;
}

.menuitem{
 font-size: 1.5em;
 color: white;
 font-weight: bold;
 margin-right: 30px;
}

.menuitem.compact{
 font-size: 1.2em;
 margin-right: 20px;
}

a.menuitem{
 text-decoration: none;
}

a.menuitem:link a.menuitem:visited a.menuitem:active{
 color: white;
}

a.menuitem:hover{
 color: yellow;
}

#logo{
 position: absolute;
 width: 250px;
 height: 64px;
 left: 100px;
 margin-top:30px;
/* transition-duration: 300;*/
}

#logo.compact{
 width: 125px;
 height: 32px;
 left: 60px;
 margin-top: 10px;
}

#content{
 margin-top: 120px;
}


The areas to note are:

The menubar has been given a "fixed" position to keep it on the page.

Note the absence of spaces where the "compact" class is use. This method is employed to indicate that an item has multiple classes.

In the compact items, the sizes have been reduced; the font is smaller, the margin has been reduced and the image has been resized to half its dimensions.


The JavaScript

Finally, we come to the JQuery functions that do the changes.


$(window).scroll(function(){
 if ($(window).scrollTop() > 200){
  //User has scrolled down. Shrink the menu, if needed
  if (!$("#menubar").hasClass("compact")){
   $("#menubar,#menuitems,.menuitem,#logo").addClass("compact",400,"easeInSine");
  }
 }else {
  //User has scrolled up. Expand the menu, if needed
  if ($("#menubar").hasClass("compact")){
   $("#menubar,#menuitems,.menuitem,#logo").removeClass("compact",400,"easeOutSine");
  }
 }
});


The script uses the window's scroll event to see if it has been scrolled. The nested if is to stop it from continuously reapplying the styles.

Upon scrolling, all the bar-related items are selected to which the "compact" class is applied or removed, as needed.

And that is all it takes.

Tuesday, December 03, 2013

Really Simple Syndication On-the-Go

With the number of cellphones and tablets increasing by the day in every country, a major shift to information access is being witnessed.

The Internet and its predecessors, the Bitnet, ARPANET, EARN and list servers, were initially developed for information sharing and searching for reference documents. The researchers at UCLA and SRI – who were the first to connect two networks with the aim of establishing a global interconnected network – could never have foreseen Project Glass, Skype or YouTube. The phone-in-a-watch was known only to Dick Tracy fans who would have themselves chuckled at this impossible notion of gadgetry ever becoming a reality.

Yet, here, we are. We have all this and much more yet lies behind locked doors. Innovative products take up to a couple of years of design and testing under near-draconian secrecy levels before hitting the market. This truly is the Information Age.

On the other hand, the art of reading is fast reducing. Under the deluge of information, no one has time to do more than skip over prĂ©cis as more, more and yet more new information keeps coming in. It is truly a wonder why the whole Internet and all its users don’t disappear in a puff of smoke.

With the large scale proliferation of mobile devices – smart phones, tablets and such – a number of developed countries are facing a strange shortage: The ether is filling up. That is to say, the frequency spectrum used by transmission technologies such as GPRS and LTE is becoming saturated. But the demand and user base keeps growing.

The major shift hinted to at the start of this discussion is that the focus is no longer on establishing a presence on the Web – that has already been done. Instead, now the focus is on getting information across. It has to be short and to the point, and it has to be delivered quickly as on mobile devices users do not open multiple tabs nor have multiple monitors.

This led to web sites that aggregated content, such as Yahoo and Google News and ultimately to aggregation software. Whichever such application is seen, each has one aim: Get the information to the user.

The original idea of article exchange using a standard XML syntax between websites was developed in 1999 by Netscape but it wasn’t until 2005 that it garnered major support from Microsoft and Opera.

Rich Site Summary, also known as Really Simple Syndication or, simply, RSS, quickly became the de facto standard mainly due to its openness and ease of implementation. The advantage to news and article via RSS quickly became visible to publishers and the RSS logo became one of the first common icons that one could see on most such web sites.

The screen sizes of most current models of smart phones and tablets make these device-owners the perfect target audience. Syndication services and programs pull in feeds from around the world and summarize them into easy to read packages. Two of the most popular programs are Flipboard and Google Currents. Both of these offer similar facilities allowing users to quickly skip and skim thru items at speeds that regular desktop computer users would not have thought they would ever need.

There are two major advantages to generating RSS feeds from sites that deal with articles such as news and magazines. Firstly, for an RSS version, the web site’s programming requires addition not a change. Hence, RSS generation may be added to without affecting the existing functionality of the web site.

Secondly, the standard markup in RSS does not deal with formatting, allowing the syndication service or application to supply its own formatting. This enables the same feed to be formatted for a variety of devices, particularly smart phones where the screen size is limited.

Further options allow syndication programs to store and cache the feed for offline reading for those places without Internet access.

As Internet access is now available in airplanes and hospitals, one wonders how long the caching facility would be needed for.

Friday, October 04, 2013

The Death of the Music Publishing Industry

The Death of the Music Publishing Industry

And the Minor Deaths of CDs

 “Heading West” was a popular term within the U.S. long before it became economically possible, then an option and ultimately a fad locally. The West was where any person with empty pockets but a heart full of zest could make his fortune. Be it in the oil fields or be it in a small town at the end of a desert. The town was full of dust and promises, heart-breaks and dreams. It was called, of all unlikely names, Hollywood. Starting off as a privately held estate, it took nearly half a century to convert into a proper township. Aside from the picturesque countryside the reason for major motion picture companies to establish themselves there was quite accidental; they just wanted to move as far away from Edison’s company and its lawyers. Thus, the industry that made dreams come true was born. Each topic was fresh, each face was new. The cellophane they produced was transported across oceans and nations. Careers and legends rose and fell each day.

The biggest fall was with the advent of the “talkies”. At first, the motion pictures that were recorded with sound were ignored by most as naught but a passing fad. What history did with these scoffers is well detailed in The Artist (2012).

The name of Eastman Kodak was synonymous with films; be they those for recording Western actions or for X-Rays. Kodak owns the patents for inventing most of the film industry and equipment. Cutting edge or bleeding edge, if it had anything to do with filming, then Kodak invented it. With camera equipment at its height, Kodak invented a gadget for the “non-serious hobbyist”: a portable digital camera. It was taken as a fad yet again, expected to pass once people got over its novelty value and returned to “serious” cameras. The giant that ruled the business world of cinematography bet its future the wrong way and ended up going into receivership in 2012.

Such is history. Each new invention raises a wake that supports a million jobs and drowns a million others.
It is now the turn of Compact Disks to join the museum shelves along with phonographs, 8-track tapes and cassettes. The curtain is coming down not just on CD’s but publishing houses, distribution companies and so on down the line.

The why of it is no mystery but is clear to everyone. CDs were invented for data storage initially but quickly shifted to audio storage for the simple reason that they offered a medium that was smaller, could store more information and reproduce music at higher quality than others. Being a change of recording mediums only, it was taken in stride by music recording companies as well as equipment manufacturers who simply phased out, or dumped, phonograph records and cassette tapes.

Their business, on the whole, remained the same: milking the success of music artists and performers worldwide. The recording companies, not the artists, profited from every sale. A complete book can be written (and many have been) on the one-sided economics of the music industry. Singer after singer worked unceasingly to produce enough material to fill one CD before any money could be made. And then, all the money went into the coffers of the companies while the singers got some fame and more bills to pay.

In this totally unfair world of music – which was/is exactly as fair as rest of life – a singer could not sell the best of songs till he or she could supply enough new songs to fill a CD and in the meantime the song was blared out from radio stations and televisions.

Suddenly, people noticed the winds of change had blown yet again when they hadn’t been paying attention and they had pockets full of digital audio recording and playing equipment to which music could be downloaded at the press of a button. “Where did this come from?”, they wondered. Then went on to hook these matchbook-sized players to their computers to download the latest songs, audio-books, cooking recipes, and so on. If you stand near any bourse, you would be able to hear the stock of recording companies crashing.

Each singer, each cook, each story-teller now has the option of distributing single contents directly. They can completely cut out the old middle man, though in favor of new ones, but with added benefits of near-zero production costs along with worldwide distribution.

The audience slash target market is near incalculable as the numbers keep increasing before any estimate may be collated. At a guesstimate, there are going to be 800 million Android and 300 million iPhones in use by the end of this year. In simple words, every 1 person alive out of 7 in the world has a smart phone. Add to that iPods and its ilk of MP3 players and you are looking at a lot of hardware.

Apple’s iTunes Store alone sold 25 billion songs. JLo’s On The Floor had 1.4 million downloads from iTunes Stores alone within a couple of months of being released, so she probably made enough money to buy a fully custom-designed airliner.

There is a huge Winchester hard drive on display at the Smithsonian. It could store an amazing 2K bytes of data. They’ll probably display the CD next to it.