Sunday, November 29, 2009

Sky+HD Surround Sound Using Onkyo TX-SR507 AV Receiver

Connections

Connect Sky+HD HDMI output to Onkyo TX-SR507 HDMI Input 1
Connect Sky+HD digital optical audio output to Onkyo TX-SR507 Digital In Optical 1

Assignments

Make the following assignments using the Onkyo TX-SR507 setup menu

Assign Sky+HD video to CBL/SAT on HDMI Input 1
Assign Sky+HD audio to CBL/SAT on Optical Input 1 and press [Enter]
Assign the Xbox 360 to AUX on HDMI Input 2

Disable HDMI Audio

To switch from HDMI audio to optical audio is not just a case of selecting "OPT1" or "OPT2" - that would be too easy! you have to press the "Enter" key afterwards to assign the already selected option, you'll then see an asterisk (*) appear beside your selection to confirm your choice.

The Dolby Digital from The SKY+HD will be ignored by the TX-SR507 unless you press [Enter] during the input assignment setup. Pressing [Enter] will disable HDMI audio and enable Digital Optical audio on this channel. If you don’t press [Enter] then you will still get Sky+HD audio through HDMI but it will only be stereo. Very confusing.

Hint. Test that Sky+HD audio is using the optical cable by connecting and disconnecting the optical digital audio cable.

Saturday, November 28, 2009

Adding Surround Sound To My Sky+HD

Sky+HD with XBox 360, PS3, DVD, Blu-Ray – you need an AV Receiver.

Adding surround sound to a Sky+HD system is far from easy and it is very important to choose the right equipment.

Yep, to get the most out of your TV it’s now back to the days of Hi-Fi separates!!!

The first thing that you need to know is that most all in one Home Cinema or Home Theatre system as sold by the likes of Argos or Comet will probably fall short of your long term expectations and this is simply because the all in one systems just don’t have enough inputs.

If you currently only have a flat screen TV and Sky+HD then you probably made sure that your new TV had as many HDMI and other inputs as possible so that you would be able to connect up all your extra equipment but this all changes when you go the surround sound route because now you only need 1 digital input on your TV and it’s your AV Receiver that needs all the extra inputs.

My Equipment

Toshiba REGZA 42RV635DB 42” Full HD 1080p LCD TV
Sky+HD (Amstrad 780-056)
Xbox 360 Elite
Onkyo TX-SR507 AV Receiver
Onkyo SKS-HT528 5.1 Surround Sound Speaker System with Subwoofer

Toshiba 42” LCD TV

The Toshiba 42” LCD TV has 4 HDMI inputs but I only need 1 input when I use an AV Amplifier.

The Toshiba 42” LCD TV has optical digital audio output but this output only outputs audio from the internal Digital TV decoder and it can’t output processed audio from other digital inputs. This means that audio input using an HDMI input will NOT be output using the optical digital audio output on the TV.

Sky+HD

The Sky+HD satellite receiver has HDMI out which does include audio but only 2 channel stereo is output using HDMI.

To get surround sound we need Dolby Digital and the Sky+HD only outputs Dolby Digital using the optical digital audio output.

Xbox 360 Elite

The Xbox 360 Elite has a HDMI output which does include Dolby Digital.

Onkyo TX-SR507 AV Receiver

The Onkyo TX-SR507 AV Receiver has
4 HDMI inputs
1 HDMI output (connect to TV)
2 coaxial digital audio inputs
2 optical digital audio inputs
Plus more inputs and outputs

Surround Sound Speaker System and Subwoofer

The Onkyo SKS-HT528 5.1 Surround Sound Speaker System has
1 x Centre Speaker
2 x Front Speaker
2 x Surround Speaker
1 x Powered Subwoofer

So a 5.1 Channel Home Theatre Surround Sound speaker system has got 5 speakers plus a subwoofer.

System Interconnects

Connect the system as follows

Sky+HD HDMI Out to TX-SR507 HDMI Input 1
Sky+HD Optical Digital Audio Out to TX-SR507 Optical Input 1
Xbox 360 HDMI Out to TX-SR507 HDMI Input 2
TX-SR507 HDMI Output to Toshiba 42” LCD TV HDMI Input 1
Also connect 5 x Speakers and Subwoofer to TX-SR507

TX-SR507 Input Assignments

Make the following assignments using the Onkyo TX-SR507 setup menu

Assign Sky+HD video to CBL/SAT on HDMI Input 1
Assign Sky+HD audio to CBL/SAT on Optical Input 1 and press [Enter]
Assign the Xbox 360 to AUX on HDMI Input 2

The Dolby Digital from The SKY+HD will be ignored by the TX-SR507 unless you press [Enter] during the input assignment setup. Pressing [Enter] will disable HDMI audio and enable Digital Optical audio on this channel. If you don’t press [Enter] then you will still get Sky+HD audio through HDMI but it will only be stereo. Very confusing.

Hint. Test that Sky+HD audio is using the optical cable by connecting and disconnecting the optical digital audio cable.

Where To Buy Your AV Equipment

Toshiba 42” LCD TV and Xbox 360 Elite purchased from Tesco.
Onkyo TX-SR507 AV Receiver purchased from Richer Sounds.

Where To Buy Your Cables

Don’t buy expensive overpriced HDMI cables at £25.00 or more. Tesco sells a basic 1m HDMI cable for just £4.99. Being a digital signal there is no need for a high quality cable.

Good Luck

I hope this little surround sound guide is useful and please post your comments and how you connected your own system.

Use Sky+HD Remote with Onkyo TX-SR507 AV

I’ve upgraded my HDTV system with the Onkyo TX-SR507 AV amplifier.

I used remote control code 01175 to make the Onkyo RC-737M remote control work most of the Sky+HD commands including SKY channel selection and live pause but it’s not possible to access the planner.

Most of the time my audio setting will already be configured and I will want to use my Sky+HD remote to change the volume and mute the Onkyo TX-SR507.

Sky+HD Remote Code for Onkyo TX-SR507

Press TV
Hold Select and 0 (2 flashes) 
Enter 0163 (2 flashes)

Enable Punch Through

Press TV
Hold Select and 1 (2 flashes)
Press Sky key

Select Sky mode and the Sky+HD remote volume up/down buttons will control volume on the Onkyo. This is very useful!!!

Select TV mode and the Sky+HD remote control Select Up and Select Down buttons will control volume on the TV and Select Right will mute the TV.

Also in TV mode the Sky+HD remote control will do lots of weird stuff to the TV and the Onkyo.

Disable Punch Through

Press TV
Hold SELECT and 0 (2 flashes)

Monday, November 16, 2009

Hibernate Shortcut

Create a shortcut called Hibernate and paste this:
rundll32.exe powrprof.dll,SetSuspendState 1 1 0

Saturday, October 17, 2009

Finding WiFi Channels

cmd /k netsh wlan show networks mode=bssid

Wednesday, September 9, 2009

Google Trends

http://www.google.com/trends/hottrends?sa=X

Use this link for the latest hot trends.

Thursday, June 25, 2009

Hospital Parking

Tomorrow I am going to visit my mum in Southampton General Hospital. We all know that hospital parking charges are horrendous so I've used Google Maps to spot good off road parking spaces. I can even use Google Street View to read the parking signs!!!

image 
Step 1. Off street parking spotted using Google Maps

image
Step 2. Use Google Street View and read the parking signs. Be careful not to to be a peeping tom if you can see into those houses!.

Monday, May 25, 2009

X1 Xperia with Voice Command

image

Voice Command for Windows Mobile

Voice Command tutorials

I have tried Voice Command for Windows Mobile devices and it works great with the X1 Xperia.

image
Look for the Bluetooth headset and microphone symbols when giving Voice Command instructions.

To use Voice Command I press the activation button on my HBH-660 Bluetooth headset and I hear a metallic ring in my ear and a microphone symbol appears in the program bar of my X1 Xperia. I can then give my spoken instruction.

Making Calls

I say "Call John Smith" and the robot voice in my ear asks me "Call John Smith at Home Work or Mobile?". I then say "Mobile" and the voice confirms "Mobile" and then dials the number. Brilliant!!!

Receiving Calls

Similarly when I receive a call the voice in my ear announces the name of the caller in a robot voice.

Launching Applications

Use Voice Command to launch application.

I say "Start Google Maps" and Google Maps will start and will even find my current location.

If I want to start GpsCycleComputer then I need to ne a little clever because Voice Command doesn't understand "G P S" unless it is spelt that way so I have to "GpsCycleComputer" with a G as in "Great". Now it works.

Configuration

Voice Command tutorials

Read the help text thoroughly to learn all the possible voice commands.

Using my X1 Xperia I couldn't create a command button but Voice Command does work perfectly with the activation button on my HBH-660 Bluetooth headset.

image 
Voice Commander integrates completely with Windows Mobile and there is only 1 settings screen.

image
Tell Voice Commander to use the Bluetooth hands free only which ensures that your phone won't start talking to you in meetings.

Troubleshooting

On my X1 Xperia I couldn't configure a command key for Voice Command but this was not a problem because the activation button on my HBH-660 Bluetooth headset works fine.

Since installing Voice Command I have has one phone freeze which required me to remove the battery to restart and I have experienced an obstinate robot voice in my ear who refused to understand anything I said until I performed a soft reset of my X1 Xperia phone. Hopefully it will settle down with use.

Thursday, May 21, 2009

X1 Internet Sharing (Tethering)

Did you know that you can use your X1 Xperia to connect your notebook or PC to the Internet?

Using your mobile to connect your notebook to the Internet is called tethering and you can make the connection between your notebook and mobile using USB or Bluetooth.

The advantage of a USB tether is that the X1 Xperia charges while you surf but you do have an extra tangle of wires to deal with.

The advantage of Bluetooth is that you can make the connection with the X1 Xperia in your pocket but you do have to make more clicks on your notebook to get it working each time and if you keep your X1 Xperia in your pocket then you will have a very hot pocket.

Using USB Tethering

image 
To start Internet Sharing on the X1 Xperia go to Programs, Tools, Internet Sharing.

Select USB and click connect.

imageA new network connection (i.e. Local Area Connection 3, Network 2) will be automatically created in your notebook Network connections and you are immediately connected to the Internet.

image
Hmm, Speed tests use a lot of bits, I hope Vodafone don't charge me £10 per megabyte!!!

image

image
Interestingly the notebook is assigned an IP address by the X1 Xperia using DHCP.

Speed Testing

I tested speeds using http://www.thinkbroadband.com/speedtest.html

USB Tether Speed Test Results

Speed Down 1160.57 Kbps ( 1.1 Mbps )
Speed Up 744.63 Kbps ( 0.7 Mbps )

Sunday, May 17, 2009

The Tao of the Software Architect

This is a very liberal reading of Lao-Tsu's Tao Te Ching for the use of software architects, based on various French and English translations. The numbers refer to the original tablets, shown at right.
 
The architect observes the world
but trusts his inner vision.
He allows things to come and go.
His heart is open as the sky. (12)
 
The architect doesn't talk, she acts.
When this is done,
the team says, "Amazing:
we did it, all by ourselves!" (17)
 
When a great architect leads, the team
is hardly aware that he exists.
Next best is a leader who is loved.
Next, one who is feared.
The worst, one who is despised. (17)
 
A good traveler has no fixed plans
and is not intent upon arriving.
A good artist lets her intuition
lead her wherever it wants.
A good scientist has freed herself of concepts
and keeps her mind open to what is.
Thus the architect is available to everyone
and rejects no one.
She is ready to use all situations
and does not waste anything.
This is called embodying the light. (27)
 
If you want to shrink something,
you must first allow it to expand.
If you want to get rid of something,
you must first allow it to flourish.
If you want to take something,
you must first allow it to be given.
This is called the subtle perception
of the way things are.
The soft overcomes the hard.
The slow overcomes the fast.
Let your workings remain a mystery.
Just show people the results. (36)
 
When the process is lost, there is good practice.
When good practice is lost, there are rules.
When rules are lost, there is ritual.
Ritual is the beginning of chaos. (38)
 
The architect concerns himself
with the depth and not the surface,
with the fruit and not the flower. (38)
 
The architect allows things to happen.
She shapes events as they come.
She steps out of the way
and lets the design speak for itself. (45)
 
The architect gives himself up
to whatever the moment brings.
He knows that he is going to leave,
and he has nothing left to hold on to:
no illusions, no resistance in his mind.
He holds nothing back from the project,
therefore is ready for departure,
as a man is ready for sleep
after a good day's work. (50)
 
The great way is easy,
yet programmers prefer the side paths.
Be aware when things are out of balance.
Remain centred within the design. (53)
 
The architect's power is like this.
She lets all things come and go
effortlessly, without desire.
She never expects results;
thus she is never disappointed.
She is never disappointed;
thus her spirit never grows old. (55)
 
Those who know don't talk.
Those who talk don't know. (56)
 
Alternate:
Those who do not have a clue are still debating about the process.
Those who know just do it. (56)
 
The architect is content
to serve as an example
and not to impose his will.
He is pointed but doesn't pierce.
Straightforward, but supple.
Radiant, but easy on the eyes. (58)
 
If you want to be a great leader,
stop trying to control.
Let go of fixed plans and concepts and
the team will govern itself.
The more prohibitions you have,
the less disciplined the team will be.
The more you coerce,
the less secure the team will be.
The more external help you call,
the less self-reliant the team will be. (57)
 

The Tao Of Programming

When I was a young programmer (apprentice) the senior programmer emailed me the Tao of Programming and it had a very profound effect on me.
 
Translated by Geoffrey James

Table of Contents
Book 1 -- The Silent Void
Book 2 -- The Ancient Masters
Book 3 -- Design
Book 4 -- Coding
Book 5 -- Maintenance
Book 6 -- Management
Book 7 -- Corporate Wisdom
Book 8 -- Hardware and Software
Book 9 -- Epilogue
Book 1 -- The Silent Void
 
Thus spake the master programmer:
 
"When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
 
1.1
Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming.
 
If the Tao is great, then the operating system is great. If the operating system is great, then the compiler is great. If the compiler is great, then the application is great. The user is pleased and there exists harmony in the world.
 
The Tao of Programming flows far away and returns on the wind of morning.
 
1.2
The Tao gave birth to machine language. Machine language gave birth to the assembler.
 
The assembler gave birth to the compiler. Now there are ten thousand languages.
 
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
 
But do not program in COBOL if you can avoid it.
 
1.3
In the beginning was the Tao. The Tao gave birth to Space and Time. Therefore Space and Time are Yin and Yang of programming.
 
Programmers that do not comprehend the Tao are always running out of time and space for their programs. Programmers that comprehend the Tao always have enough time and space to accomplish their goals.
 
How could it be otherwise?
 
1.4
The wise programmer is told about Tao and follows it. The average programmer is told about Tao and searches for it. The foolish programmer is told about Tao and laughs at it.
 
If it were not for laughter, there would be no Tao.
 
The highest sounds are hardest to hear. Going forward is a way to retreat. Great talent shows itself late in life. Even a perfect program still has bugs.
 
Book 2 -- The Ancient Masters
Thus spake the master programmer:
 
"After three days without programming, life becomes meaningless."
 
2.1
The programmers of old were mysterious and profound. We cannot fathom their thoughts, so all we do is describe their appearance.
 
Aware, like a fox crossing the water. Alert, like a general on the battlefield. Kind, like a hostess greeting her guests. Simple, like uncarved blocks of wood. Opaque, like black pools in darkened caves.
 
Who can tell the secrets of their hearts and minds?
 
The answer exists only in Tao.
 
2.2
Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed:
 
"I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!."
 
2.3
A programmer from a very large computer company went to a software conference and then returned to report to his manager, saying: "What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their clothes were wrinkled and old. They crashed our hospitality suite and they made rude noises during my presentation."
 
The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, an accidental coincidence. They come and go without knowing limitations. Without a care, they live only for their programs. Why should they bother with social conventions?
 
They are alive within the Tao."
 
2.4
A novice asked the Master: "Here is a programmer that never designs, documents or tests his programs. Yet all who know him consider him one of the best programmers in the world. Why is this?"
 
The Master replies: "That programmer has mastered the Tao. He has gone beyond the need for design; he does not become angry when the system crashes, but accepts the universe without concern. He has gone beyond the need for documentation; he no longer cares if anyone else sees his code. He has gone beyond the need for testing; each of his programs are perfect within themselves, serene and elegant, their purpose self-evident. Truly, he has entered the mystery of Tao."
 
Book 3 -- Design
Thus spake the master programmer:
 
"When the program is being tested, it is too late to make design changes."
 
3.1
There once was a man who went to a computer trade show. Each day as he entered, the man told the guard at the door:
 
"I am a great thief, renowned for my feats of shoplifting. Be forewarned, for this trade show shall not escape unplundered."
 
This speech disturbed the guard greatly, because there were millions of dollars of computer equipment inside, so he watched the man carefully. But the man merely wandered from booth to booth, humming quietly to himself.
 
When the man left, the guard took him aside and searched his clothes, but nothing was to be found.
 
On the next day of the trade show, the man returned and chided the guard saying: "I escaped with a vast booty yesterday, but today will be even better." So the guard watched him ever more closely, but to no avail.
 
On the final day of the trade show, the guard could restrain his curiosity no longer. "Sir Thief," he said, "I am so perplexed, I cannot live in peace. Please enlighten me. What is it that you are stealing?"
 
The man smiled. "I am stealing ideas," he said.
 
3.2
There once was a master programmer who wrote unstructured programs. A novice programmer, seeking to imitate him, also began to write unstructured programs. When the novice asked the master to evaluate his progress, the master criticized him for writing unstructured programs, saying, "What is appropriate for the master is not appropriate for the novice. You must understand the Tao before transcending structure."
 
3.3
There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?"
 
"An operating system," replied the programmer.
 
The warlord uttered an exclamation of disbelief. "Surely an accounting package is trivial next to the complexity of an operating system," he said.
 
"Not so," said the programmer, "when designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws. By contrast, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design."
 
The warlord of Wu nodded and smiled. "That is all good and well, but which is easier to debug?"
 
The programmer made no reply.
 
3.4
A manager went to the master programmer and showed him the requirements document for a new application. The manager asked the master: "How long will it take to design this system if I assign five programmers to it?"
 
"It will take one year," said the master promptly.
 
"But we need this system immediately or even sooner! How long will it take if I assign ten programmers to it?"
 
The master programmer frowned. "In that case, it will take two years."
 
"And what if I assign a hundred programmers to it?"
 
The master programmer shrugged. "Then the design will never be completed."
 
Book 4 -- Coding
Thus spake the master programmer:
 
"A well-written program is its own heaven; a poorly-written program is its own hell."
 
4.1
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.
 
A program should follow the `Law of Least Astonishment'. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least.
 
A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.
 
If the program fails in these requirements, it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program.
 
4.2
A novice asked the master: "I have a program that sometime runs and sometimes aborts. I have followed the rules of programming, yet I am totally baffled. What is the reason for this?"
 
The master replied: "You are confused because you do not understand Tao. Only a fool expects rational behaviour from his fellow humans. Why do you expect it from a machine that humans have constructed? Computers simulate determinism; only Tao is perfect.
 
The rules of programming are transitory; only Tao is eternal. Therefore you must contemplate Tao before you receive enlightenment."
 
"But how will I know when I have received enlightenment?" asked the novice.
 
"Your program will then run correctly," replied the master.
 
4.3
A master was explaining the nature of Tao of to one of his novices, "The Tao is embodied in all software -- regardless of how insignificant," said the master.
 
"Is the Tao in a hand-held calculator?" asked the novice.
 
"It is," came the reply.
 
"Is the Tao in a video game?" continued the novice.
 
"It is even in a video game," said the master.
 
"And is the Tao in the DOS for a personal computer?"
 
The master coughed and shifted his position slightly. "The lesson is over for today," he said.
 
4.4
Prince Wang's programmer was coding software. His fingers danced upon the keyboard. The program compiled without an error message, and the program ran like a gentle wind. "Excellent!" the Prince exclaimed, "Your technique is faultless!" "Technique?" said the programmer turning from his terminal, "What I follow is Tao -- beyond all techniques! When I first began to program I would see before me the whole problem in one mass. After three years I no longer saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without plan, follows its own instinct. In short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off."
 
Prince Wang said, "Would that all of my programmers were as wise!"
 
Book 5 -- Maintenance
Thus spake the master programmer:
 
"Though a program be but three lines long, someday it will have to be maintained."
 
5.1
A well-used door needs no oil on its hinges. A swift-flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used.
 
These are great mysteries.
 
5.2
A manager asked a programmer how long it would take him to finish the program on which he was working. "It will be finished tomorrow," the programmer promptly replied.
 
"I think you are being unrealistic," said the manager, "Truthfully, how long will it take?"
 
The programmer thought for a moment. "I have some features that I wish to add. This will take at least two weeks," he finally said.
 
"Even that is too much to expect," insisted the manager, "I will be satisfied if you simply tell me when the program is complete."
 
The programmer agreed to this.
 
Several years later, the manager retired. On the way to his retirement luncheon, he discovered the programmer asleep at his terminal. He had been programming all night.
 
5.3
A novice programmer was once assigned to code a simple financial package.
 
The novice worked furiously for many days, but when his master reviewed his program, he discovered that it contained a screen editor, a set of generalized graphics routines, an artificial intelligence interface, but not the slightest mention of anything financial.
 
When the master asked about this, the novice became indignant. "Don't be so impatient," he said, "I'll put in the financial stuff eventually."
 
5.4
Does a good farmer neglect a crop he has planted? Does a good teacher overlook even the most humble student? Does a good father allow a single child to starve? Does a good programmer refuse to maintain his code?
 
Book 6 -- Management
Thus spake the master programmer:
 
"Let the programmers be many and the managers few -- then all will be productive."
 
6.1
When managers hold endless meetings, the programmers write games. When accountants talk of quarterly profits, the development budget is about to be cut. When senior scientists talk blue sky, the clouds are about to roll in.
 
Truly, this is not the Tao of Programming.
 
When managers make commitments, game programs are ignored. When accountants make long-range plans, harmony and order are about to be restored. When senior scientists address the problems at hand, the problems will soon be solved.
 
Truly, this is the Tao of Programming.
 
6.2
Why are programmers non-productive?
Because their time is wasted in meetings.
 
Why are programmers rebellious?
Because the management interferes too much.
 
Why are the programmers resigning one by one?
Because they are burnt out.
 
Having worked for poor management, they no longer value their jobs.
 
6.3
A manager was about to be fired, but a programmer who worked for him invented a new program that became popular and sold well. As a result, the manager retained his job.
 
The manager tried to give the programmer a bonus, but the programmer refused it, saying, "I wrote the program because I thought it was an interesting concept, and thus I expect no reward."
 
The manager upon hearing this remarked, "This programmer, though he holds a position of small esteem, understands well the proper duty of an employee. Let us promote him to the exalted position of management consultant!"
 
But when told this, the programmer once more refused, saying, "I exist so that I can program. If I were promoted, I would do nothing but waste everyone's time. Can I go now? I have a program that I'm working on."
 
6.4
A manager went to his programmers and told them: "As regards to your work hours: you are going to have to come in at nine in the morning and leave at five in the afternoon." At this, all of them became angry and several resigned on the spot."
 
So the manager said: "All right, in that case you may set your own working hours, as long as you finish your projects on schedule." The programmers, now satisfied, began to come in at noon and work to the wee hours of the morning.
 
Book 7 -- Corporate Wisdom
Thus spake the master programmer:
 
"You can demonstrate a program for a corporate executive, but you can't make him computer literate."
 
7.1
A novice asked the master: "In the east there is a great tree structure that men call `Corporate Headquarters'. It is bloated out of shape with vice presidents and accountants. It issues a multitude of memos, each saying `Go, Hence!' or `Go, Hither!' and nobody knows what is meant. Every year new names are put onto the branches, but all to no avail. How can such an unnatural entity be?"
 
The master replied: "You perceive this immense structure and are disturbed that it has no rational purpose. Can you not take amusement from its endless gyrations? Do you not enjoy the untroubled ease of programming beneath its sheltering branches? Why are you bothered by its uselessness?"
 
7.2
In the east there is a shark which is larger than all other fish. It changes into a bird whose wings are like clouds filling the sky. When this bird moves across the land, it brings a message from Corporate Headquarters. This message it drops into the midst of the programmers, like a seagull making its mark upon the beach. Then the bird mounts on the wind and, with the blue sky at its back, returns home.
 
The novice programmer stares in wonder at the bird, for he understands it not. The average programmer dreads the coming of the bird, for he fears its message. The master programmer continues to work at his terminal, for he does not know that the bird has come and gone.
 
7.3
The Magician of the Ivory Tower brought his latest invention for the master programmer to examine. The magician wheeled a large black box into the master's office while the master waited in silence.
 
"This is an integrated, distributed, general-purpose workstation," began the magician, "ergonomically designed with a proprietary operating system, sixth generation languages, and multiple state of the art user interfaces. It took my assistants several hundred man years to construct. Is it not amazing?"
 
The master raised his eyebrows slightly. "It is indeed amazing," he said.
 
"Corporate Headquarters has commanded," continued the magician, "that everyone use this workstation as a platform for new programs. Do you agree to this?"
 
"Certainly," replied the master, "I will have it transported to the data centre immediately!" And the magician returned to his tower, well pleased.
 
Several days later, a novice wandered into the office of the master programmer and said, "I cannot find the listing for my new program. Do you know where it might be?"
 
"Yes," replied the master, "the listings are stacked on the platform in the data centre."
 
7.4
 
The master programmer moves from program to program without fear. No change in management can harm him. He will not be fired, even if the project is cancelled. Why is this? He is filled with Tao.
 
Book 8 -- Hardware and Software
Thus spake the master programmer:
 
"Without the wind, the grass does not move. Without software, hardware is useless."
 
8.1
A novice asked the master: "I perceive that one computer company is much larger than all others. It towers above its competition like a giant among dwarfs. Any one of its divisions could comprise an entire business. Why is this so?"
 
The master replied, "Why do you ask such foolish questions? That company is large because it is large. If it only made hardware, nobody would buy it. If it only made software, nobody would use it. If it only maintained systems, people would treat it like a servant. But because it combines all of these things, people think it one of the gods! By not seeking to strive, it conquers without effort."
 
8.2
A master programmer passed a novice programmer one day. The master noted the novice's preoccupation with a hand-held computer game. "Excuse me," he said, "may I examine it?"
 
The novice bolted to attention and handed the device to the master. "I see that the device claims to have three levels of play: Easy, Medium and Hard," said the master. "Yet every such device has another level of play, where the device seeks not to conquer the human, nor to be conquered by the human."
 
"Pray, great master," implored the novice, "how does one find these mysterious settings?"
 
The master dropped the device to the ground and crushed it under foot. And suddenly the novice was enlightened.
 
8.3
There was once a programmer who worked upon microprocessors. "Look at how well off I am here," he said to a mainframe programmer who came to visit, "I have my own operating system and file storage device. I do not have to share my resources with anyone. The software is self- consistent and easy-to-use. Why do you not quit your present job and join me here?"
 
The mainframe programmer then began to describe his system to his friend, saying "The mainframe sits like an ancient sage meditating in the midst of the data centre. Its disk drives lie end-to-end like a great ocean of machinery. The software is as multifaceted as a diamond, and as convoluted as a primeval jungle. The programs, each unique, move through the system like a swift-flowing river. That is why I am happy where I am."
 
The microcomputer programmer, upon hearing this, fell silent. But the two programmers remained friends until the end of their days.
 
8.4
Hardware met Software on the road to Changtse. Software said: "You are Yin and I am Yang. If we travel together we will become famous and earn vast sums of money." And so the set forth together, thinking to conquer the world.
 
Presently they met Firmware, who was dressed in tattered rags and hobbled along propped on a thorny stick. Firmware said to them: "The Tao lies beyond Yin and Yang. It is silent and still as a pool of water. It does not seek fame, therefore nobody knows its presence. It does not seek fortune, for it is complete within itself. It exists beyond space and time."
 
Software and Hardware, ashamed, returned to their homes.
 
Book 9 -- Epilogue
Thus spake the master programmer:
 
"It is time for you to leave."
 

Tuesday, May 12, 2009

UK Regional Dialects

Geordie

Newcastle

Mackem

Sunderland

Scouse

Liverpool

Sunday, May 10, 2009

Windows Live For Windows Mobile

The Vodafone UK customisation for the X1 Xperia includes Windows Live for Windows Mobile version 10.6.0039.1300.

It is reported that Vodafone have crippled this version so that it will only use a mobile data connection to connect to Hotmail etc.

There is now a new version of Windows Live for Windows Mobile which is version 10.6.0046.0800 and this version will use a WiFi (WLAN) connection.

Find
WindowsLive_0409.PPC2005_arm (connect via WiFi and or GPRS-3G).cab

image 
Windows Live for Windows Mobile version 10.6.0039.1300

image 
Windows Live for Windows Mobile version 10.6.0046.0800

This version works over a mobile data connection (GPRS-3G) AND WiFi (WLAN).

http://www.messengergonemobile.com/

The download from Windows Live website is by SMS link and I can't remember where I downloaded the WindowsLive_0409.PPC2005_arm.cab version. 

X1 Remove End Of Call Beeping

image

On the SE X1 Xperia if the other person hangs up before you do, or the connection drops, you get 3 loud beeps.

The 3 beeps are bit annoying for normal calls.

There is no menu option to disable this, but the following procedure does work:

Method 1:

Get Total Commander and navigate to //registry/HKCU/controlpanel/sounds/calldrop

(The registry is hidden a little, first press the '\' icon in the top right to ensure you are in the root of the phone. Now press and hold the stylus on the '\\Plugins' folder and choose open...then open registry etc)

Open up "sound" and delete the calldrop.wav text

Now when someone hangs up before you, you just get a small click noise instead of BEEP-BEEP-BEEP!

Method 2:

The calldrop.wav file is in the windows directory. My original plan was to just delete it, or overwrite it with a blank wav file. But the directory is write protected and as I have to go to work in a min I couldn't be bothered with finding out how to unprotect the file/folder and generate a blank wav! I'm sure that would also work though

Let me know if you try this mod…

X1 Xperia Updated Firmware R2AA007

I updated my Sony Ericsson using Sony Ericsson Update Service (SEUS) to firmware R2AA007 which has been customised by Vodafone UK.

Now we are all waiting for the R3AA007 update.

image

image

image

image

image

image

 

Post a comment here if you have found an even more recent firmware version…

X1 Xperia Original Firmware R1AA020

The original Vodafone firmware for the Sony Ericsson X1 Xperia is R1AA020

image

image

image

image

image

Saturday, May 9, 2009

VB.Net Convert String to Integer

It should be the simplest thing but you can come unstuck if you try to convert an empty string to an integer.

'The following conversions DO NOT work
Dim x1 As Integer = Convert.ToInt16("")
Dim x2 As Integer = Convert.ToInt32("")
Dim x3 As Integer = CInt("")
Dim x4 As Integer = CType("", Int32)

'The following conversions DO work
Dim x5 As Integer = Convert.ToInt32(Val(""))
Dim x6 As Integer = Convert.ToInt32(IIf(stringValue = "", 0, stringValue))

Session State versus Cache

Cache is global, and sessions are per user

ASP.NET session state solves all the problems associated with classic ASP session state:

Process independent. ASP.NET session state is able to run in a separate process from the ASP.NET host process.

If session state is in a separate process, the ASP.NET process can come and go while the session state process remains available. Of course, you can still use session state in process similar to classic ASP, too.

Support for server farm configurations. By moving to an out-of-process model, ASP.NET also solves the server farm problem.

The new out-of-process model allows all servers in the farm to share a session state process. You can implement this by changing the ASP.NET configuration to point to a common server.

Cookie independent. Although solutions to the problem of cookieless state management do exist for classic ASP, they're not trivial to implement. ASP.NET, on the other hand, reduces the complexities of cookieless session state to a simple configuration setting.

The advantages of using session state are:
Ease of implementation: The session state facility is easy to use, familiar to ASP developers, and consistent with other .NET Framework classes.

Session-specific events:
Session management events can be raised and used by your application.

Durability:
Data placed in session-state variables can survive Internet Information Services (IIS) restarts and worker-process restarts without losing session data because the data is stored in another process space.

Platform scalability:
Session state can be used in both multi-computer and multi-process configurations, therefore optimizing scalability scenarios.

Session state works with browsers that do not support HTTP cookies, although session state is most commonly used with cookies to provide user identification facilities to a Web application.

The disadvantage of using session state is:

Performance. Session state variables stay in memory until they are either removed or replaced, and therefore can degrade server performance. Session state variables containing blocks of information like large datasets can adversely affect Web server performance as server load increases.

Concerning Cache, one of the most important factors in building high-performance, scalable Web applications is the ability to store items, whether data objects, pages, or parts of a page, in memory the initial time they are requested. You can store these items on the Web server or on other software in the request stream, such as the proxy server or browser. This allows you to avoid recreating information that satisfied a previous request, particularly information that demands significant processor time, or other  resources, on the server when it is created. Known as caching, it allows you to use a number of techniques to store page output or application data across HTTP requests and reuse it. Thus, the server does not have to recreate information, saving time and resources.

ASP.NET provides two types of caching that you can use to create high-performance Web applications. The first is called output caching, which allows you to store dynamic page and user control responses on any HTTP 1.1 cache-capable device in the output stream, from the originating server to the requesting browser. On subsequent requests, the page or user control code is not executed; the cached output is used to satisfy the request. The second type of caching is traditional application data caching, which you can use to programmatically store arbitrary objects, such as data sets, to server memory so that your application can save the time and resources it takes to recreate them.

ASP.NET provides simple mechanisms for caching page output or data when they do not need to be computed dynamically for every page request. In addition, designing pages and data requests to be cached, particularly in areas of your site that you expect heavy traffic, can optimize the performance of those pages. More than any feature of the .NET Framework, using the cache appropriately can affect the performance of your site, sometimes by more than an order of magnitude.

The caching mechanism built into ASP.NET allows powerful control over the caching, and therefore, the performance and scalability of a site by adding simple directives to ASP.NET pages. Using the cache improves the response time of the Web server by reducing the processing required by the server.  As less processor time is spent on redundant tasks, scalability can also be dramatically improved.

Pages that use the Output Cache are executed once, and the page results are cached.

The pre-executed page is then served to subsequent requests.

Performance and Scalability both benefit:
- Server response time decreases
- CPU load decreases
- Appropriate caching of pages impacts site performance dramatically.

More info
Using ASP.NET Session State in a Web Service

JScript – Check all Checkboxes

Jscript to check checkboxes
 
<HTML>
<HEAD>
<script>
function chkall()
{
    for (var n=0; n < document.forms[0].length; n++)  
    {   
        if (document.forms[0].elements[n].type=='checkbox')    
        {    
            document.forms[0].elements[n].checked=true;    
        }  
    }
return false;
}
</script>
</HEAD>
<BODY>
<form action="chboxes.aspx" onsubmit="return chkall();">
    <P><INPUT type=checkbox></P>
    <P><INPUT type=checkbox ></P>
    <P><INPUT type=checkbox ></P>
    <P><INPUT type=checkbox ></P>
    <P><INPUT type=submit value=Submit name=submit1></P>
</form>
</BODY>
</HTML>

C# Parameters

Are parameters passed by reference or value in C#?

By default, all parameters are passed by value in C# - but you need to be aware that when you're passing a reference type, you're passing a reference rather than an actual object.

Hungarian Notation

Don't use Hungarian Notation in C# or Dot.Net
strName
The reason Hungarian Notation has been deprecated for .Net programming is because it is no longer needed.
 
Historically, the compiler did not perform the strict type checking that we now get with .NET and therefore it was a benefit to know what the Type of a given variable was just by looking at its name.
 
Now however, we really couldn’t care less what the Type is since, the compiler will highlight any mismatches. OO programming offers polymorphism and hence variables can be of many different Types at the same time.
 
Additionally, if all our variables were originally of Type “string” and hence called strName (under Hungarian Notation), what would happen if we decided to modify the Type of the variable to a new object called “Name” object, should we then go and rename all our variables “strName” to “nameName”. Of course not. We should just have used “name” in the first place and no changes would be necessary if we decided to modify its Type at some point in the future.

GET and POST

<form action="form_action.asp" method="get" target="_self">

The difference between GET and POST

GET is passed as part of the URL and as such is far more easily altered by the user and cached by proxy servers.

POST is slightly more secure, and isn't limited to only the 255 byte limit that GET data is restricted to.

The HTTP method for sending data to the action URL.

Default is get.

method="get": This method sends the form contents in the URL: URL?name=value&name=value. Note: If the form values contains non-ASCII characters or exceeds 100 characters you MUST use method="post".

method="post": This method sends the form contents in the body of the request. Note: Most browsers are unable to bookmark post requests.


Action

A URL that defines where to send the data when the submit button is pushed


target

Where to open the target URL.

_blank - the target URL will open in a new window

_self - the target URL will open in the same frame as it was clicked

_parent - the target URL will open in the parent frameset

_top - the target URL will open in the full body of the window

Aspect Ratio

Algorithm to resize a graphic and maintain the aspect ratio:

isoScalar = Min((dstWidth / srcWidth), (dstHeight / srcHeight)) 
newWidth = isoScalar * srcWidth
newHeight = isoScalar * srcHeight

Here is a C# function:

/// <summary>///
Rescale the source size to fit inside the template size and maintain the aspect ratio
/// </summary>
Size Rescale(Size szeSource, Size szeTemplate)

  int newWidth = 0; 
 
int newHeight = 0; 
  try //handle possible divide by zero 
  {  
    float isoScalar = Math.Min(((float szeTemplate.Width / szeSource.Width), ((float)szeTemplate.Height / szeSource.Height)); 

    newWidth = (int)(isoScalar * szeSource.Width);  
    newHeight = (int)(isoScalar * szeSource.Height); 
  } 
  catch{}  

  return new Size(newWidth, newHeight);
}

Character Representation in HTML

Characters Decimal Hexadecimal HTML Character Set Unicode
" (double quotes) &#34 &#x22; &quot; \u0022
' (single quotes) &#39 &#x27; &apos; \u0027
& (ampersand) &#38; &#x26 &amp; \u0026
< (lesser than) &#60 &#x3C; &lt; \u003c
> (greater than) &#62 &#x3E; &gt; \u003e

Friday, May 8, 2009

Star Wars vs Dambusters

image

Long, long ago, in a galaxy far, far away…

Did you know that Star Wars was a straight remake of Dambusters?

"How many guns do you think Gold Leader?”… “Say about 20 guns, some on the surface, some on the towers"

"I’m going to cut across the axis and try to draw their fire."

These dialogues taken from Star Wars during the attack on the Death Star were originally from the scene in Dambusters when the Lancasters were attacking the German dams.

The lasers shooting from the Death Star match the tracer fired from the Dams.

The scene cutting from the attack to the control room and back to the the attack are the same in both films.

In Dambusters the pilots use converging lights to gauge their altitude and in Star Wars the Navi Computer lines converge.

While writing this post I found this great piece on You Tube.

http://www.youtube.com/watch?v=_NMfBKrdErY

Have you spotted any other connections between films…

Crusade For Better Picture Quality On Sky

image

Do you remember when Sky launched their Digital satellite TV service and their promise of perfect digital picture quality compared to the analogue satellite TV service?

I'm sure that at the time the picture quality of the Standard Digital (SD) was more than adequate.

Recently Sky have been relentlessly promoting their High Definition (HD) service and have been telling us how it is so much better then the SD service.

It is true that SD now looks completely crap and when you watch any football match you will see that the players have a pixel halo around their bodies as they run across the pitch. But in reality the SD picture does not have to look so crap and it is more likely that Sky have reduced the picture quality of SD to make it look even more inferior to their HD service.

The irony is that Sky have reduced the picture quality of SD by increasing the compression and the allocated bandwidth is reduced leaving more bandwidth for HD.

My Crusade

My crusade is for Sky to restore the picture quality of the SD satellite TV service to the best possible quality.

If you agree then please leave a comment below...

AJAX Executes Complete Page On Server

image

http://www.asp.net/Ajax/Documentation/Live/overview/UpdatePanelOverview.aspx

An asynchronous postback behaves like a regular postback in that the resulting server page executes the complete page and control life cycle.

It makes sense that the whole page is executed on the server otherwise the child controls would not know what to show. The benefit of the partial page update is that the rendered content is not sent to the browser client which may be a performance benefit and of course page flicker is eliminated.

Nevertheless it must be considered that AJAX will not necessarily reduce the processor load on the server.

Post your ASP.Net and AJAX experiences in the comments below…

Thursday, May 7, 2009

Joy of Mail2Blogger

image

For some postings I am now using the Mail2Blogger email feature.

I just send an email to a special blogger email address and it is instantly published.

<b>Limitations</b>

There are some limitations...
Only plain text is published so any HTML formatting is lost.
I am testing if it is possible to add basic HTML mark-up such as <b>bold</b> in the email .
Images probably don't work.
Labels & categories are not supported.

Post your Mail2Blogger experiences and tips in the comments below...

Wednesday, May 6, 2009

WiFi Channel Conflict

If your network and another are both trying to use Channel 11 in close proximity to each other, neither of you is going to have wonderful performance.

image

The only non-overlapping 11b/g channels are 1, 6 & 11 but restricting to these channels is only useful in a non congested locale.

If as most of us there is competition for channel space in your area then choose 3, 4 or 8, 9 and at least part of your spectrum avoids the most popular channels.

Ch 14 also looks like a good bet if you can select it and it is unused.

Crusade For Using Mini Roundabouts

image

In the UK we have a lot of mini roundabouts.

I don't have a problem with the mini roundabouts, I think they are great, but I do object to the way that through traffic approaches the roundabout at full speed with no regard whatsoever for vehicles which are already on the roundabout.

Vehicles travel too fast and can cover the distance on approach to the roundabout and then enter the roundabout in the time it takes for a another vehicle to enter the roundabout from the left.

My Crusade

My crusade is that when approaching a mini roundabout traffic slow down and not proceed at full speed against traffic which is already on the roundabout.

Do you think we need to change we use mini-roundabouts? Post your comments here…

Crusade Against The Cost Of SMS Text Messaging

image

Why do mobile phone SMS text messages cost so much to send per text?

SMS text messages can't possibly cost the mobile phone companies 10p or even 20p each!!

Origins of SMS

Way back then I was one of the first ever public users of the GSM network and deep inside my Nokia menus I found an arcane capability to send text message to other mobile phone users. I tested it by sending an SMS text to myself and decreed that it was just too difficult to enter a message using just the digit keys and it would never catch on.

The True Costs

The mobile phone companies must have also thought it would never catch on because they hardly advertised the service at that time or did anything to make the service easier to use.

Even the actual text message is sent using spare capacity in the mobile phone control network which is why the text message length is restricted to 160 characters. Thus SMS texts should be completely free because they don't cost the mobile phone companies anything.

The truth is that the mobile phone companies are desperate to charge as much as they can for SMS texts and they rue the day that it is was first possible to send an email for free.

My Crusade

My crusade is to reduce the costs to the public of SMS Text messages to as little as possible and for free if possible.

What do think about the cost of SMS text messaging? Post your comments below…

Tuesday, May 5, 2009

Synchronise With NTP Time Server

image

The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks.

A less complex form of NTP that does not require storing information about previous communications is known as the Simple Network Time Protocol or SNTP. It is used in some embedded devices and in applications where high accuracy timing is not required.

Synchronise the computer clock with a public Internet NTP Time Server to have constantly accurate time on your computer.

Synchronise a Windows domain controller with a public Internet NTP Time Server and all the computers on the domain will synchronise with the domain controller.

pool.ntp.org Project

http://www.pool.ntp.org/zone/uk

The pool.ntp.org project is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers.

United Kingdom — uk.pool.ntp.org
To use this pool zone, add the following to your ntp.conf file: 
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org

Set the NTP Time Server

To set the NTP time server(s) on a Windows computer run this command in a console window:

net time /setsntp:"0.uk.pool.ntp.org 1.uk.pool.ntp.org 2.uk.pool.ntp.org 3.uk.pool.ntp.org"

To check the result run this command in a console window:

net time /QUERYSNTP

Force NTP Time Synchronisation

The Windows Time (W32Time) service periodically synchronises the computer time but it can take some time to update for the first time.

To force the time to synchronise on Windows 2003 Server simply stop and start the Windows Time (W32Time) service.

On Vista stopping a starting the Windows Time (W32Time) service does not work but running net time /set in a command console window will cause Vista to synchronise with a domain controller.

Proof of Life?

I know that the computer clocks on my domain are accurately synchronised because I have a Casio Wave Captor 3053 radio controlled digital watch automatically which synchronises with the time calibration signals in England (Rugby) . Other time signals are available in Germany (Mainflingen), United States (Fort Collins) and Japan.

http://en.wikipedia.org/wiki/Time_from_NPL

It is possible that in the UK the National Physical Laboratory (NPL) time signal is now transmitted from the Anthorn VLF transmitter near Anthorn, Cumbria.

More Net Time Commands

Net Time options Description
Net Time Displays the time of your time server
Net Time \\computername Displays the computer name time
Net Time /DOMAIN:domainname Displays the time on a DC domain name
Net Time /domain/set Sets computer time to match time on Domain Controller
Net Time /RTSDOMAIN:domainname Displays the time on a time server in the domain name
Net Time /querysntp Displays the SNTP source for the time server
Net Time /setsntp:ntpserver Sets the SNTP source for the time server
Net Time /setsntp Clears the SNTP source for the time server

Useful Links

http://www.pool.ntp.org/
http://en.wikipedia.org/wiki/Time_from_NPL
Mastering the Windows Time Service

Do your serves run on time…