Thursday, June 26, 2008

Hungarian Notation

In Microsoft, a man named Charles Simonyi created specification for writing Microsoft code. All Microsoft APIs, interfaces, technical articles, and so on use these conventions.
The specification is generally referred to as Hungarian notation

Hungarian notation consists of a number of conventions relating to naming:
• Variables
• Functions
• Types and constants
• Classes
• Parameters

Following figure shows all the prefix codes used in Hungarian notation. These codes are used to prefix variable names in most cases, along with other conventions depending on what is being named.



Variable Naming

With Hungarian notation, variables are prefixed by the codes mentioned in above figure. In addition, if a variable name is made up of one or more subnames, each subname is capitalized.


Basically, you begin the variable with g_, or sometimes just plain g.


Function Naming

Functions are named in the same way variables are, but without the prefixes. In other words, just capitalize all the first letters of subnames. Here are some examples:

int PlotPixel(int ix, int iy, int ic);
void *MemScan(char *szString);


Also, underscores are illegal. For example, the following wouldn’t be a valid
Hungarian-compliant function name:

int Get_Pixel(int ix, int iy);

Type and Constant Naming

All types and constants are in uppercase, but you’re allowed to use underscores in the names. For example:



Class Naming

All C++ classes must be prefixed by a capital C, and the first letter of each subname of the class name must be capitalized. Here is an example:



Parameter Naming

Parameters to functions follow the same naming conventions that normal variables do.
However, this is not a necessity. For example, you might see a function definition that looks like this:

UCHAR GetPixel(int x, int y);

In this case, the more Hungarian prototype would be

UCHAR GetPixel(int ix, int iy);

Also you might not even see the variable names, but just the types, as in this example:

UCHAR GetPixel(int, int);

Of course, this would only be used for the prototype, and the real function declaration must have variable names to bind to.


Programming Ring - New Post
Programming Ring - Old Post

Tuesday, June 17, 2008

The Road Not Taken by Robert Frost

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the other, as just as fair,
And having perhaps the better claim,
Because it was grassy and wanted wear;
Though as for that the passing there
Had worn them really about the same,
And both that morning equally lay
In leaves no step had trodden black.
Oh, I kept the first for another day!
Yet knowing how way leads on to way,
I doubted if I should ever come back.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference.


Poems Ring - New Post
Poems Ring - Old Post

Monday, June 09, 2008

The Man Spurs Will Never Forgive - by LD on VitalFootball

http://www.arsenal.vitalfootball.co.uk/article.asp?a=506261


I've expressed my disdain for transfer news dozens of times, so with an impending summer of annoying garbage in store and no 'real' football to write about, I have decided to produce a series to replace the twenty questions gambit which will be on hiatus in the summer. (My propensity to produce series is common amongst obsessives)! So I have decided to focus on Arsenal's intimidating history to look for its pinnacle figures. Men who were responsible for the evolution of the club, either as players, managers or administrators. A club such as Arsenal is blessed with a multitude of such figures, so there are omissions. Men such as Don Howe, who has had three spells at the club including as Assistant Manager to Bertie Mee in the 71 Double triumph. Ken Friar who joined the club in 1950 as a messenger and rose to become our Chief Executive and is now our acting Managing Director. Great players such as Ted Drake, Ian Wright and Robert Pires, though beacons of our club, do not make the list. These are the men that are the perpetrators of Arsenal's fortune, men who became synonymous with the grandeur associated with Arsenal Football Club, the revoltionaries who put us on the map. Throughout the summer I'll take a whistle stop tour through the lot.

Where else could I possibly begin? Herbert Chapman I hear you cry? No. I begin with a man who was the catalyst for our success, the man who bullied Arsenal into the collective conscious. Politician, racketeer, Machiavel. A controversial figure whose legacy can be summed up thusly. Seventy years after his death and eighty years after leaving the club, Spurs still hate him. Of course I am talking about Henry Norris. Aptly, Norris was a distant relation to a sixteenth Century diplomat of the same name who was executed for his, ahem, attention to Anne Boleyn. Like his distant Grandfather, Henry Norris would revel in befriending and betraying the upper echelons of high society. Norris was born in 1865, leaving school at 14, he developed his sharp negotiating acumen as an estate agent. He was almost solely responsible for Fulham's regeneration, he quickly acquired a fortune in property, building up a network on contacts and connections which he would later call upon to aid the Gunners. He was made Mayor of Fulham, a leading Tory and a Freemason. Norris did not so much press the flesh as pound it into submission, whether it be with his legendary charm or his fearsome bark. Norris stood at over six feet tall and wore a thick monacle, which distorted his gaze. This added to a Bond villainesque kind of presence, which he utilised fully to impose himself on detractors.

In 1912, the well to do Norris wanted to buy a London football club and challenge the North of England's dominance in the sport. With Chelsea, Clapton Orient and Tottenham Hotspur all operating soundly, Norris knew he could barge his way onto the board of troubled Woolwich Arsenal with ease. He was the Abramovic of his time. The Arsenal board welcomed his savvy negotiating skills, as a Director of Fulham he had bartered Fulham from the Southern League to Division Two in just four years, leading to unfounded accusations of bribery. Norris wanted to merge Fulham and Arsenal, but for the only time until his ill reputed expulsion from football, the Football League blocked Norris from doing so. He was however, allowed to stay on as a Director of Fulham whilst simultaneously being Arsenal's Chairman. With the merger blocked, Sir Henry set about a contingency plan. With Woolwich Arsenal in the midst of a 1912/13 campaign that would see them relegated in front of meagre crowds in the inaccessible backwater of Plumstead (where a good deal ofmy family hail from incidentally, it's still a pain to get to) in front of tiny crowds, Norris sought about moving Arsenal into the London Borough of Islington. He set his sights on Finsbury Park, a short jaunt from the West End, better transport links and a much bigger population.

Using his swelling address book, Norris secured six acres of land owned by the St. John's Divinity College at Avenell Road- a sight used by bishops and priests to play cricket. Of course, local clubs saw the threat. Orient, Spurs and Chelsea continued to lobby the football league to block the move. If the local NIMBYs we faced securing the Emirates looked hard work, what Norris faced was infinitely more challenging. An F.A. Committee investigated the proposed relocation, but guess what? The committee was coincidentally packed with Norris' chums and they gave it the go ahead. Next up, the Church Committee who vehemently opposed the idea of an 'ungodly' practise such as football taking place on holy grounds. But a £20,000 cheque seemed to quell their protests. Norris' friendship with the Archbishop of Canterbury cannot have harmed Norris' quests to get the deeds signed by, erm, the Archbishop of Canterbury. Norris erstwhily promised not to sell intoxicating liquor and not to host matches on holy days. Sir Henry found promises easy to make and impossible to honour. By 1915, booze was on sale in Highbury's walls and the Gunners were fulfilling home fixtures on Christmas Day.

Norris also extended his vast network to the local press, Islington hacks that opposed the move found themselves on the breadlines rather quickly. Norris was also accused of deliberately leaking news of the move during Arsenal's 1912/13 relegation season to the local press and underinvesting in the team to strengthen his grounds for becoming football's first gypsies. Once the opposition had been bribed, charmed and removed, Norris set about constructing the ground. Having made his fortune in property and architecture, he knew exactly where to begin. Henry happened to be chummy with fellow Mason J.Whiting, the Mayor of Manchester. Norris used this contact to establish a friendship with the architect of Newton Heath's Old Trafford ground Archibald Leitch. Arsenal had their architect, Norris hired locals as labourers, the thought process being that this could set the foundations for a North London fanbase and instill a sense of local pride towards the downtrodden nomads. Tottenham countered with a press campaign pleading with North Londoners not to support 'the interlopers.'

With Arsenal having successfully increased their fanbase with the move, Norris' most controversial act was on the horizon. The team were still not performing. They finished fifth in the Second Division in the 1914/15 season, before football was suspended for the war. Chelsea and Tottenham occupied the bottom two positions in Division 1. At the resumption of competitive football in 1919, the Football League were restructuring the football league. Norris used his legendary negotiating savvy by convincing the football league that London based Arsenal would be a more enticing prospect for the top flight than Wolves or Barnsley (who finished above Arsenal in Division Two). Norris would once more call upon backslapping from the boardroom drinks cabinet and promised his good friend the Chelsea chairman that his club would be offered a reprieve and their league status would be assured if they voted for Arsenal's promotion. Arsenal won the vote eight to eighteen and were elected tothe topflight, Wolves and Barnsley stayed down and Tottenham were relegated. The rivalry that enused lasts to this day.

Sir Henry got his comeuppance in 1929. He was found guilty of bribing Sunderland's Charlie Buchan to sign for the Gunners in 1925, in the says of the maximum wage. (Ironically, Arsenal would be the club instrumental of the removal of the maximum wage in the early sixties). He was also found guilty of using club accounts for personal use and pocketed the £125 fee for selling the team bus. In 1929, the F.A. banned him from football for life. But Norris ensured that his upwardly mobile approach would be preserved and Arsenal's legacy would continue to grow. In 1925, he appointed Herbert Chapman as manager and the rest, as they say, is history. Norris was the man who set the foundations for the Gunners' continued success, he took a club in the doldrums and propelled them, by foul means or fair, into football's correct social circles. Arsenal would always be seen at the right parties thereafter. The North London derby is his most identifiable legacy. Years before 71 or 2004, or 1987 or Sol Campbell, Norris sewed the seeds of hatred. He ensured that the gypsies usurped the landed gentry.

- LD


Sick as a parrot
An interesting side story to the whole 1919 vote is apparently the origin of the football cliche sick as a parrot. In 1908 Tottenham had gone on a tour of Argentina. On the ship on the way home and in recognition of their success the ships parrot was presented to the club by the captain. It survived happily at the club for ten years - dying on the day that Arsenal were given Spurs' place in the first division in 1919.
- Amos.



Arsenal Ring - Old Post