Thursday, January 6, 2011

Happy New Year

Been a while. Happy New Year. That is all.

Wednesday, June 2, 2010

Moon Solar Panel Feasibility (Back of the Envelope)

Ok, so this is a quick mock up and not necessarily accurate in any way shape or form (I used wikipedia) but here goes anyhoo:
After reading http://gizmodo.com/5552774/lets-cover-the-moon-in-solar-panels, it got me thinking. How much power could it generate and how financially feasible is the idea? Probably been done before but so what.

As a reference: Annual Production of USA=~3992 billion kWh (25% of Earth Generation/Consumption)
Average Cost: 12-25 Cents/kWh

The Moon
Circumference: 10921 KM -(i)
Width of Solar Panel Belt: 1 KM -(ii) (for simpler calculations later)
Area of Solar Energy Impact: 30% -(iii) (Prob not the technical term but I am guesstimating that at any given time, about 30% worth of the surface of the moon is the power source. Some parts get less light due angles and some get full impact. I have guestimated it to be 30% but feel free to suggest a more suitable value)
Total Panel Area: 10,921,000,000 Square Metres -(iv) (i * ii)
Total Power Generating Area(30% of Total Area): 3,276,300,000 Square Metres -(v) (iv * iii)

PANELS
Solar Power: About 1366 W/m2 -(vi) (Approximately)
Efficiency: 11% -(vii) (Typical Efficiency of Commercial Panels albeit there are higher efficiencies available)
Power per Square metre: 150.26 Watts -(viii) (vi * vii)
Cost (per Metre Squared): US$300 -(ix)
Weight: 12 Kg -(x)


POWER OUTPUT
Total Power Generation: 492.3 Tera Watts -(xi) (v * viii)
Output per Annum(in kWh): 4312.52 Billion kWh -(xii) (xi * 24 * 365)

TRANSMISSION
Efficiency: 50% -(xiii)
End Users Receive(Billable): 2156.26 Billion kWh-(xiv)

COSTS
Cost of Panel(per sq m): US$300 -(xv)
Launch Cost: US$ 20,000 per Kg -(xvi) (Am assuming to the moon and not just Orbital. Big assumption, I know.)
Total Launch Cost for All Panels: US$2621.04 Trillion (!??) -(xvii)
Assume the install cost is included. (Why not? If I am paying 2621 Trillion Dollars....) -(xviii)
Maintenance: see xviii -(xix)


Assuming Life Span: 10 Years -(xx)
Cost Per Annum: US$ 262.43 Trillion -(xxi) (xvii/xx)

COST PER kWh: US$ 121.71 -(xxii) (xxi/xiv)

Inferences
If Solar Efficiency is Boosted to 30% (currently its up to about 20%) and Launch Cost is reduced by Half to 10,000 per KG (Indian Space Research Organisation aims to hit this target within 2 years), Cost Per kWh becomes 22.34 which is still way more than existing supplies.
It only becomes palatable (imho) if Life Span of Project is 20 Years,Panel Efficiency touches 50%, and launch cost comes under US$2500 per Kg. This results in a cost of US$1.69 per kWh. Though we havent achieved these price points yet, it is concievable that it can be done within a few decades. Just my two bits.

PS: I have an excel file with the above if anyone wants it



Tuesday, September 8, 2009

International Dates in Access SQL (VBA or Direct Query)

After a day of googling, binging, shouting and screaming at an inorganic yet most likely demonic creation that is the PC, I think I've finally managed to sort this baby out.

The Environment
Date in a table is stored using the UK date system, i.e. dd/mm/yyyy. System is also set for the UK date/time and locale.

The Problem
In VBA, I was using Dlookup to retrieve an ID associated to a specific date. It sometimes returned the wrong result (sometimes Null). This was inside a loop and looped through a set of dates inside a table.

Attempted Solutions
At first I thought its a flaw in VBA. So i tried Cdate , CVdate, converting to string, converting to date, comparing strings and so on and so forth. Spent half a day playing with VBA trying to get the right date.
Then (i dont know why i waited this long to try this...live and learn!), I decided to try a query in SQL using an explicitly declared date. It worked. So back to VBA.
After another hour or so...I had narrowed it down to errors starting when the month changed a carrying on thereafter. Again I decided to check SQL and Voila! Wrong Result. Changing to the american date system gave the right result. So obviously even though my system settings and everything else said UK date format not to mention access using the right format everywhere else, when it came to an SQL query involving dates, it only used the american method.
Then came further web trawling to try and fix this issue...

Working Solution
The following method worked for me.
Suppose you have the following code:

...
dim tmpdate as date 'this is the date I have
dim tmpstr as string 'this is the string i want a value returned to

tmpdate ="15/09/2007" 'The code actually looked it up and got the right answer
tmpstr = Dlookup("field","tablename","[DatetoUse]=" & tmpdate)
...
It gave tmpstr = Null even though it shouldnt. However if I modified the criteria bit in Dlookup using the Format() function, it worked ok. My new line was

tmpstr = Dlookup("field","tablename","[DatetoUse]=" & Format(tmpdate,"mm/dd/yyyy"))

Bizzare. At least now it works correctly!

I am Browser King

The ubiquitous Internet Browser. In a future where SaaS would be fairly standard, the focus will be as much on the browsers as the OS. Its probably the lightest method to get true blue cross platform compatibility. As browsers go, I think this is the first time I am unable to pick one to use as standard.
Around '96-97, in the early days of the internet, Netscape would rule the roost for me. I still remember getting a copy of Netscape Navigator 3 Gold Edition with my new PC. The geek in me was proud to possess the ultimate browsing tool. Nevermind the 19.2Kbps internal modem that ensured loading times far exceeded the life of the universe....
Netscape and ICQ pretty much dominated my early Internet excursions. Of course there was the occassional experiment with Opera or Internet Explorer, one always went back to Netscape. Till it kicked the bucket sometime around version 4.
With microsoft settling its anti trust issues long enough to launch a seemingly better browser in '99 and IE 5 was good. Nothing exceptional but completely functional. Thats how it remained till the end of the IE 6 series. Tons of security holes, minor issues, slow load up times but it worked with every website. When in doubt, IE it.
Then came the launch of Mozilla (later Firefox). Here was a browser loudly proclaimed as the spiritual successor to Netscape. An alternative to the microsoft anathema. It was buggy, and ate my ram for breakfast. And wasnt compatible with all sites (though more compatible with the web standards to be fair to it). Yet for a long while this remained my standard tool of choice. IE 5/6 was back up. Firefox was the main browser. Then IE 7 came out. More Secure. Similar Features. A pile of rubbish along side that other monstrosity, Vista.
Two softwares of the Apocalypse. XP was rock solid. Stable, fast and easy to use. With a few tweaks, its security flaws were easily fixed. The OS to end all OSes. Then came Vista. Irritating. Slow. Irritating. Compatibility Issues. Irritating. The software equivalent of a nagging wife. Probably well meaning but constantly warning me that its risky to run my game. Or to let it access the internet. or to download that file. Happy to say Windows 7 rocks. Maybe its a MS thing. Windows 95 was irritating. 98 good. Me shite. XP Good. Vista Shite. 7 good. expect the 7's successor to be rubbish at this rate...but i digress.
IE 7 was rubbish. Firefox entrenched itself on my PC. Till Chrome reared its head last year. Fast. Simple. Clever. Didnt eat my memory and fairly stable. Daily Browsing on chrome. something didnt work, use Firefox else IE as last resort. And so it went...till a few months ago and IE 8. Also fast and safe and a few clever features. Nothing exceptional but then one would be asking too much if it did. I thought twice about a website if it meant loading IE 7. IE 8? no problemo. But heres the catch. its still number 2. 2? Wasnt Firefox 2? Alas , no! though there is little to choose between the two, IE is a teeny bit quicker to load and doesnt eat my memory so it took 2nd place over firefox. That said, there is very little to choose between all three of them.
Now comes Opera 10. And after 20 minutes of use it feels excellent. I love the sessions feature. Something akin to what I hacked into my chrome. I always find myself loading a similar set of pages depending on what I am doing and have been loading it up manually using an external file. Now though, with sessions built into Opera, methinks thats in the past. It really is something that should've been done ever since tabbed browsing came about. Now its here. Expect the others to incorporate it soon. Gestures and other bits are all built into it as well but i havent really tried it yet. Loved the gestures addon in firefox when i used to use it. havent really used it anywhere since but something tells me opera and chrome will become dominant. FF is like the iPhone. every1 has one and tons of apps. IE is like, well, any windows mobile. functional and does everything. Not as cool. Chrome is the young pretender. People use it and its slick. and now theres Opera. Something touted to do all of the above. As is the case with many things, commercial success and critical success dont necessarily see eye to eye.
As of now, I dont use any one exclusively. We are creatures of habit and once we get used to a browser we dont really change. Thing is though, not one browser offers all the features I want. Firefox still has memory issues. IE is still a bit bland. Chrome still has minor website compatibility issues. And i havent tried out opera fully yet but I like what I see so far. The key point though still remains the commercial success of a browser as it will define how useful it will be tomorrow. Netscape ensured Javascript was developed. IE ensured ActiveX acceptance. Mozilla/FF introduced a lot of new approaches to browsing. All possible because of their dominance in the marketplace ensured others to adopt their ideas. Much like how Microsoft ensured software developed at the pace it did (we do have the business nous of ol' Billy Gates to thank for that).
The Google Brandname will ensure Chromes success. Microsofts power (not to mention the improved user experience) will keep IE strong. Firefox...heres something which will suffer a bit at the hands of chrome. Which leaves us with Opera. Will it garner critical acclaim? Will it achieve commercial success? Is there room for it at the big boys table? answers on a postcard...

Sunday, June 14, 2009

Crickalympics: Hardest, Furthest & Longest

So India crashed out of the Twenty20 cup. I am strangely unmoved by it. No tinge of embarassment. Its not that I dont like Twenty20. I was converted by the final stages of the IPL 2. Its just that its the format of cricket where hand eye co-ordination plays a more important role than the mind does. Thats not to say its brainless, but just as The Hobbit, a good book in its own right, isnt quite the same as the Lord of the Rings, Twenty20 isnt quite Test Cricket. Each has its own set of devotees and they are all correct in their opinion.

In favour of Twenty20
There is something magical about demolishing a bowling attack and nary is a young boy in india who hasnt dreamed of doing the same even before the advent of Twenty20. Some even managed to achieve it in real life. hark back to the sharjah cup and Sachin Tendulkar vs Australia. Jadeja vs Pakistan in the world cup or even Tendulkars domination of Warne over the years. The thrills of the IPL and twenty20 rolls all this into a neat little 3 hour package. About the same length as an average bollywood film but far from an average display of skill and ability.
The increased interest in the sport can only be a good thing which no one can deny and if Test Cricket was to survive the long term, it needs Twenty 20 to ensure it doesnt slip into an obscure form of colonial sport with quirky rules and shall we say, unusual hairstyles (Ryan Sidebottom, take a bow)!
The bowlers have come on in leaps and bounds since the first IPL (I say IPL because, in the Twenty20 world, IPL seems to supercede the World Cup). Whilst the first cup was about who can hit the hardest, furthest and longest, IPL2 seemed to focus on who can restrict and take wickets. The conditions obviously had a role to play too with the Sunny climes and batsman friendly pitches of India giving way to the seaming swinging bowler friendly environs of South Africa. This was on display as RP Singh et al made merry during the purple cap race. Allow me to digress and say Bowling and batting is no longer a quest of personal glory in a larger scheme of the teams well being but now also a sartorial contest. The less said about "Miss Bollywood" (is this a Shag Modi ruse?) and the ten minute ten over fag breaks, the better.
On the plus side, cricket has a new breed of followers. Thats good.

In favour of Test cricket
Yuvraj Singhs Six 6s notwithstanding, it still doesnt quite awe me as much as the VVSpecial innings against Australia or Steve Waughs numerous steely excusrsions. The mental strength, the physical endurance and the courage required for these innings far outweigh the smash and grab 20/20 efforts. The temperament required in the longer formats is quite different from those in the shorter versions and the magic of cricket lies in how the longer versions showcase the mental character of our willow wielding heroes. Its hard for a newcomer to grasp how people can play five days and still enjoy a draw. Thats because, the ability to recognise the effort required is acquired and cant be had overnight. Just as go karting is a showcase of driver ability, and Formula 1 is a demonstration of driving ability coupled with engineering superiority, Test cricket is more than a demonstration of Hand Eye co-ordination. Bowlers are far more aggressive and less concerned with containment. There are no powerplays or fielding restrictions. Its a different animal and the rules, as similar as they are, might as well be miles apart. In test cricket, the better side invariably wins.

There is more scope for the underdog in Twenty20 and the entertainment value is higher but then a hard fought victory is so much sweeter in Test Cricket. Even for us mortal spectators.

Monday, May 18, 2009

Hello World!

Ok. Blogs. The ultimate rectification of the american dream where everyone can do anything. No. No you cant write. Your blog is rubbish. and you should give up any hope or dream of ever being an author. of course, some write just to keep a track of their thoughts. use wordpad. or a mac/linux equivalent. not everyone needs to divulge into your sordid mind and see your thoughts. unless of course there is some serious erotica, which is printable. Of course, thats not a route i'll take but i wont promise anything. I write because sometimes i enjoy irritating people. Its the buddhist way.
So continue at your own peril. Also a word of warning, if I do offend you, please, please, please, either formulate proper arguments and then let me win or go away. It only takes one click.