YuviSense: Codin Kid

Yuvi, a 17 year old wannabe geek from India.
  • rss
  • Blog
  • Photography
  • Indians on Twitter
  • About Me
  • Contact

Yet another Redesign…

April 30, 2006 | 7:55 am

Well, well, My Previous blog design quite sortof didn’t work out as I expected it, and so I’m abandoning it and getting a new one today. But, this is just a default one from Blogger. I’ll suppose I’ll do some heavy customization tomorrow, since I’ve already overshot my 1 GB limit by more than a 150 MB:(( So, till then, put up with this one…

Comments
3 Comments »
Categories
Blogging, Design
Comments rss Comments rss
Trackback Trackback

Blog Redesign….

April 23, 2006 | 4:14 pm

Well, just redesigned my Blog once again. So, it looks a bit 1998-ish, with the Sidebar gone. But, it’s now replaced by a new Javascript Menu. How does it look ? Haven’t finished with it though. So, even If you are reading this from an Aggregator, just hover back here for a look…

Comments
5 Comments »
Categories
Blogging, Design, Uncategorizable
Comments rss Comments rss
Trackback Trackback

Moving to GMail…

April 22, 2006 | 7:21 pm

Well, I’m abandoning Yahoo Mail and moving to GMail Today. I’ve unsubscribed from All my Newsletters[Which I never read anyway], changed my Topcoder Profile and my .NET Passport. And, it looks like, I’ve made neccessary arrangements, and I’ve also set up Auto-Forwarding from the Yahoo Account to my GMail Account. So, even though Sudar gave me a GMail Invite quite a long time ago, I’m starting to use it only now. So, If you wanna mail me, you can either mail me at yuvipanda@yahoo.co.in, or yuvipanda@gmail.com. But, You’ll recieve the response only from yuvipanda@gmail.com. Spammers Welcome:D

The main reason I switched was Yahoo Mail’s Pathetic SPAM Filtering and Pathetic Response Times. Well, at last count, my SPAM box contained 42 pieces of Mail, of which only 12 were actual Spam, but, the Rest were False Positives! Pathetic, isn’t it ?

Well, Yahoo!, so, pretty much get your act together and improve it. Ramesh said that he’s got Beta version of Next Gen Yahoo Mail, and it rocks. So, let’s wait for it…

Till Then………….GMail!

Thanks, and Keep the comments coming….

Comments
3 Comments »
Categories
Personal
Comments rss Comments rss
Trackback Trackback

[Math]Proving 2+2 = 0 and other incredible stuff

| 11:21 am

Update: Well, hawkeye posted a comment, spotting my grave Mistake. Silly me : I’ve lost more than one Mark in more than one Maths Paper more than once, and yet I make the same mistake. Stupid me:D Thanks hawkeye, for correcting me before I gave that to my Maths Teacher and get spanked:D

No Joke. I got this during a boring Morning before Second Revision English II Exams. So, I’ve got proof that 2+2 = 0. After trying to find a mistake in this for some 2 hours yesterday night, I’m posting this here. I’m probably wrong, but I can’t find out where I am wrong. So, here we go :

(a) 12 = 1
(b) (-1)2 = 1(c) From (a) and (b), 12 = (-1)2

(d)Therefore, 1 = -1
Reason : If Powers are equal, bases can be equated

(e) Assume 2+2 = x
(f) (2 x 1) + (2 x 1) = x
Reason : Since 2 = 2 x 1

(g) (2 x 1) + (2 x -1) = x
Reason : Since 1 = -1 [From (d)]
(h) 2 + (-2) = x
(i) 2 - 2 = x
(j) 0 = x

(k) Substituting x = 0 in (e),
2 + 2 = 0

So, this is for a specific case. It can be easily Generalized into a generic form :

x + x = 0

Also, from this, you get :
x = -x

Well, the proof also gives a really interesting Corrollary : Every Number is Equal to any other Number!

Assume any Number1 = xThen, according to Proof above :

x + x = 0
2x = 0 - (1)

Assume any Number2 = y

Then,

y+y = 0
2y = 0 - (2)

So, from (1) and (2),
2x = 2y

Dividing both sides by 2, we get :
x = y

So, any Number is equal to any other Number! Cool, isn’t it ? It also has quite nice implications. Like, I owe someone Rs. 1000. Since, according to the proof, I take x = Rs. 1000 and y = Rs. 1. So, since x = y, I can just pay Rs. 1, since It is equal to Rs. 1000! And, if someone owes me Rs. 1, I can just invert the process, and get Rs. 1000, while ofcourse it can backfire and they can pay me Rs.(-)1000, since obviously, Rs.(-)1000 = Rs. 1000 = Rs. 1.

Well, heard of the word Paradox ? I’m feeling it….

Well, it’s got more : All Fractions and Divisons equal 1, since the Numerator and the Denominator will be equal! And, they will also equal any number, without constraint, since 1 can be equal to any number!

Man, Maths will be sooooooooooooo much Easier : I can give any value as answer to any questions, and it will be correct! You’ll get 100 out of 100 every time! But wait, 100 out of 100 might as well be equal to 0 out of 100, because 0 = 100. Paradox:D

So, where am I wrong ? What part of the proof is wrong ? I sincerely really Don’t know, so you’ve really gotta help me find the fault with this…..

If you’re Still with me after this long post, I want your comments…

Comments
7 Comments »
Categories
Lame, Uncategorizable
Comments rss Comments rss
Trackback Trackback

Crack at a Spammer…

April 21, 2006 | 9:44 am
I did this quite some time ago, but the thought of Posting this here came only today….Well, Sudar knows of some funny spam. Well, after I read that post originally on November 2005, I decided to read some of the Spam in my Yahoo Spam Box and see what’s there. So, first up, I came across this :

Dear Friend,

I cannot imagine the surprise this will bring to you, but please be
rest
assured it is with good faith and intentions from a friend in dare need
of
your assistance.This is to help us transfer the inheritance sum of
US$7,700,000 (Seven Million Seven Hundred U.S Dollars) into your
account or
company's account, in which God will bless you for rendering a helping
Hand
to others.

My name is Mr. kwame Jacobs, and I work with First Atlanta Company in
Ghana
and i am writing in respect of Mr.Choi Soohyun a customer who perished
in a
plane crash [Korean Air Flight 801] with the whole passengers on board
on
August 6, 1997.

I personally have watched with Keen interest Since the demise of this
our
customer to see the next of kin but all has proved abortive as no One
has
come to claim his funds of US$7,700,000, which has been with my company
for
a very long time. On this note, I decided to seek for whom his name
shall be
used as the next of kin as no one has come up to be the next of kin.
Below
is the website of the plane crash,

http://www.cnn.com/WORLD/9708/06/guam.passenger.list/

For your efforts, I am prepared to offer you 30% of the total sum while
5%
will be set aside for expenses incurred during the course of this
Transaction, 5% for the less Privileged in the society and the
Remaining 60%
is for me and my Partners.

Please note that this transaction is risk-free and the major thing I
ask of
you is to assure me the safety of the money when transferred to your
account. Further Information and arrangement will commence as soon as
trust,
Confidence and good relationship is established.

I shall be most grateful if you maintain the confidentiality required
In
this transaction. Do not hesitate to contact me for further Directives
to
enable us commence towards the conclusion of this transaction.

Please respond to this mail using my email address :

I wait for your prompt response.

Thanks and God bless,

kwame Jacobs.

Well, a typical, classical African Spam. So, instead of just keeping it in my Spam Box, I just decided to give my feedback to the spammer :

Hi Dr. Patrick Allain, I think I am good enough to
detect a Phishing attack like this. Spelling Mistakes,
Wrong Capitalization and a great eye for Details mark
a really good spammer. And, I saw all these here :
You got the name of a Plane which Crashed, saw the list of
the passengers who died, found the name of the man whose
Country couldn't be determined, Harvested my eMail
from somewher(probably my Blog), and sent me this
Mail...

Kudos to you man, but I'm not falling for this...

On the Other Hand, I do have respect for your
abilities, and I think you could put them to good use

And, I actually got a reply for this from that spammer! :

thank you alot mr yuri.well i do not have much to write
since you are convience inside you that it is a game.
thats ok .but for accepting me as a friend,i appreciate it
and will keep intouch with you.

kwame jacobs

Not to be outdone, I replied to this as well :

More spelling mistakes.. Dude, you've gotta get a
Spell Checker if you wanna convince people that you're
serious:P

Well, maybe that guy’s abandoned that email ID, but I’m still to get a Reply for this….

Spam is so much fun, isn’t it ?:D

Comments
2 Comments »
Categories
Lame, People, Rants
Comments rss Comments rss
Trackback Trackback

Mission Accomplished!

| 8:10 am
Well, some 3 Months back, Dad bought me an 80 CD Capacity CD Pouch. And, I vowed to fill it with Linux CDs. Fully. To the Brim. Only Linux. All 80 CDs. And, today morning, I have accomplished it! Man, doesn’t it feel wonderful, having so many distros, most of which you’d never use!:DAnyway, here’s the boring list of Distros I have :

  1. Gnoppix
  2. SimplyMEPIS
  3. Knoppix 3.9
  4. Ubuntu 5.1 LiveCD
  5. aLinux 12.6 LiveCD
  6. GNUStep 0.9.4.2 LiveCD
  7. Fedora Core 4
  8. FSBIE - Variant of FreeBSD LiveCD
  9. PC-BSD 1.0 RC2
  10. Ubuntu Linux 5.1
  11. SuSE 9.1
  12. Mandriva 2006
  13. Mono-Live CD
  14. FreeBSD
  15. PCLinux 0.9.2
  16. Looking Glass 3D LiveCD 2.30
  17. Slackware
  18. Edubuntu 5.10
  19. Knoppix 4.0
  20. SuSE 10
  21. Gentoo 2005.1
  22. Gentoo 2006.1 Live+Install CD
  23. Fedora Core 5
  24. Damn Small Linux
  25. WinLinux

Well, If you’re still with me, know that I lied : I filled all 80 of them only because I have two copies of SimplyMEPIS. So, I actually have 1 Slot still left, but can’t seem to find any Single CD Distro to fill it up. Any Ideas guys ? Only significant distro I’m missing is Debian, but, I really don’t want it…. And, KUbuntu, but I’ve already got Ubuntu and KDE Seperately, so it won’t count, right ?

Comments
6 Comments »
Categories
Tech
Comments rss Comments rss
Trackback Trackback

Welcome to Chennai…

April 20, 2006 | 1:24 pm
Well, Wikipedia is turning out quite a few Gems. One of them which I found today, and which made me laugh for almost half an hour while reading through this, is this Article on Madras Bashai Vocabulary and Madras Bashai. The First Article has an almost complete list of Words used in this Innovative connotation by the Chennaiites. I’ve heard most of them, though not used any:D And, the second one has a bit of history, and has some common Sentences, which are absolutely hilarious to Read, yet so commonplace to hear.Man, I love Wikipedia:D

P.S. I think the first Article was written by a Passionate College Student. Read it, and you’ll feel it:D

Comments
3 Comments »
Categories
India, Rants, Writing
Comments rss Comments rss
Trackback Trackback

Why don’t they get it ?

April 19, 2006 | 6:52 pm
I mean, why don’t these DD people get it ? When Sahara ONE was transmitting thes India-England Series, I always watched them, even though DD was also transmitting. Why ? Because, every other half hour, they’ll get two people to replace the normal English Commentary with a Hindhi one. Problem is, the English Commentators are located on the spot, so they can easily see that a ball is heading towards a Fielder and don’t get excited about it. But, these Hindhi Commentators get the same view as the viewers, and so get Overly Excited mistaking a single for a four, and vice versa.And, on top of wasting your Adrenaline, they are actually pretty bad Commentators : When in Yesterday’s match, when Irfan was given not out to a catch since it actually hit his helmet, the Commentator casually remarked that Irfan was lucky that he was caught off a No-Ball! When that catch was taken, it was English commentary, and the English Commentators had it clear that it hit the helmet. And, When this guy comes up and says he was caught off a no-ball, that’s pretty stupid…

And, need I mention that a good Majority of People in India ACTUALLY DON’T UNDERSTAND HINDI ? Maybe, they don’t know that many languages beside Hindi exist. Atleast, localize it, like they do for the Regional Servie. Or, use English. Heck, they won’t be doing both, and use only Hindi. Bad…..

Bottom Line: Would a Linuxie like it if Linux was available only in Finnish, because that was Linus Trovald’s native Language ? No. Would a Cricket Fan be happy when commentary is available only in Hindi because some braindead Moron in Government Middle-Management decided all people in India speak only Hindi ? No…

P.S. I don’t mean to offend Hindi or Hindi Speaking People. I only mean to offend those DD Officials[sic].

Comments
4 Comments »
Categories
India, People, Rants
Comments rss Comments rss
Trackback Trackback

Firefox Bus!

April 18, 2006 | 7:38 pm
Man, I never knew Firefox was that Popular:D And, that too in India, where most people think they’re using GMail, not Email[Yes, a guy said that to me when I asked his EMail Address:D]. I’ve seen Microsoft Buses, but seriously, a Firefox Bus is Awesome:D
Comments
1 Comment »
Categories
India, Tech
Comments rss Comments rss
Trackback Trackback

[Tech]Seemingly Memory Optimization Trick for Class B people….

April 17, 2006 | 1:55 pm
Well, let me explain the title a bit. According to me, there are 4 kinds of computer Users :

  • Class A, who don’t know anything, and know that they don’t know anything
  • Class B, who know something, and think they know everything
  • Class C, who know something, and know that they know only something
  • Class D, who know more than something, and know that they know more than something

Well, Class A would be my Dad : He knows that he doesn’t know anything, about computers, that is.[Note to Self : There’s a Sneaky Creature behind my back, so be careful] Class B would be me about a year ago : I had no idea of the internet, infact, I thought that .NET = the Web;) Thankfully, due to the Internet, Wikipedia, MSDN, CodeProject, Blogs and my Cousin Sudar, I’m now in Class C.

OK. If you’ve been reading a lot, you’dve come across this before, but if you haven’t hear. Now, a Class B guy opens up a .NET app, goes to task manager, and finds rocket-high Memory consumption. So, he thinks, “Ooh! This app is *bloated* and takes up soooo much memory. No wonder it was made by Microsoft“.

#Region “Feel Free To Ignore This If You Don’t Like Theory”

What he doesn’t know is that what Task Manager calls as “Mem Usage”, is really “Working Set Memory Usage”. Well, to understand Working Set, we have to understand the concept of “Paged Virtual Memory Management”, which is used by Windows. Now, let me get a nice analogy here. The Working Set is like a Scratch Page for your Maths : It’s fast, it’s on your RAM, and it’s the place where you do most of your calculations. In Single-tasking Environments like DOS, you had only one Page do do everything on. So far, so good…

Now, in a Multi-Tasking Environment like Windows, Each Process gets it’s Own Scratch Page. It can see only it’s own Scratch Page, not another Process’s Scratch Page.

If you’re allocating so much memory that this Scratch Page is full, then Windows writes that to disk, and you get a New Page. If you want to access anything in your older Page, Windows just loads that Page back, and reads that value for you. So, you can never run out of Memory, even if you’re allocating 257 MB of Memory with a System that has only 256 MB of RAM, Windows uses Paging to allocate that much Memory. And, all this is transparent to you. You can just pretend that the System had Unlimited Memory, and allocate as much as you want. This system is known as a Virtual Paging Memory System. Hope I’m clear till now. If I am not, then just read this article on Wikipedia on Virtual Memory.

So, the Working Set is just the amount of stuff you’ve stored in Your Current Scratch Page. This, is what Task Manager reports, and it does not count all those Previous Scratch Pages. It’s like, you’re writing a Maths Exam, and just submit the last page you worked on.

So, inorder to get an actual Value of how much Memory your app is using, you need to get the size of all your Pages. And, this Value, confusingly called VM Size by the Task Manager, is almost always higher than than the Working Set, since pages which are old and not frequently accessed are not loaded by Windows untill they are called. You can view this in the Task Manager itself by going to View - Select Columns and checking the Virtual Memory Size checkbox. This gives a realistic View of how much Memory your App is using.

Now, also, when an App is minimized, windows unloads all the Pages of the app into Disk. So, the Working Set appears drastically Reduced, but the VM Size remains the same.

#End Region

Still with me ? Good. Now, I’ll show you a neat Trick that satisfies Class B Users by reducing the apparent Memory Usage of your app reported by Task Manager in just 2 Lines of Code. So, if one of your Boss/PM/Teacher/Departmenal Head keeps saying how much memory a .NET app is taking, just use this trick to convince them.

So, you first declare this Declare statement, declaring a Win32 API call. It’s called SetProcessWorkingSetSize :

Private Declare Function SetProcessWorkingSetSize _
Lib "kernel32.dll" _
(ByVal hProcess As IntPtr, _
ByVal dwMinimumWorkingSetSize As Int32, _
ByVal dwMaximumWorkingSetSize As Int32) _
As Int32

And, somewhere in your app, prefereably in the end of the Load Event or somewhere else, just keep this piece of code :

SetProcessWorkingSetSize _
(System.Diagnostics.Process.GetCurrentProcess.Handle _
,-1,-1)

So, we are passing the SetProcessWorkingSetSize Function the handle of our Process, and setting the minSize and maxSize to -1, meaning that Windows will Trim them to lowest possible Value. As soon as this line of code executes, you’ll find that Task Manager Reports a Mem Usage of below 1 MB. But, VM Size would be normal for a .NET app…

This actually doesn’t Optimize Memory Usage, but just makes it look like your app is consuming less memory than it really is. Most useful in situations to convince people who don’t understand that Windows gives Memory to people as they need it, so Memory Usage isn’t actually that Importand for stability of other Apps….

Bottom Line: If you don’t understand any of the Crap I wrote above, just remember this : If someone is asking you to reduce their .NET Memory Consumption, just fake it to them with the Above code.

P.S. Man,this took a whole hour! I just can’t believe time flies sooo fast when you are doing something you love…

If you’re still with me, I’d want to hear a comment….:D

Comments
2 Comments »
Categories
Tech
Comments rss Comments rss
Trackback Trackback

Peak of Usability…

| 12:45 pm
Well, I’m a big fan of Joel Spolsky. His Forums on JoelonSoftware.com are quite simple and functional. And, they’ve also got the most Signal-to-Noise Ratio i’ve seen. And, Joel’s clearly documented the process of why The Forum is so simple like that. And, I consider it to be a success when a Guy like this can make a post.
Comments
2 Comments »
Categories
Design, Rants, Tech
Comments rss Comments rss
Trackback Trackback

Why am I targeted ?

April 16, 2006 | 8:27 pm
Like, I don’t know why. You know, ask me to type out a 150 page English Technical Document, I’d do that with pleasure. But, ask me to write a Presentation for 3rd Graders in Tamil, Introducing them to Tamil, and all I can do is get extreeeeeeeeeeeeemelllllllly frustrated and pissed off and write a blog post. And, that’s exactly what I am doing. Maybe, I shouldn’tve admitted that there is a way to use the Insert -> Symbols in Word to, sort of click type Words. And, now, aaaaaarghhhhhhhhhhhhhhhhhh……………….. I’m stuck doing something I know is stupid while I could’ve much better been preparing my next tech Post on making Memory Optimization of Class B people… aaaaaaaaaarghhhhhhhhhhhhhhh…..
Comments
1 Comment »
Categories
Personal, Rants, School, Uncategorizable
Comments rss Comments rss
Trackback Trackback

[Tech]Creating thumbnails of an Image in just a single Line…

April 15, 2006 | 10:22 pm
Well, Thumbnails were all the rage during the dot-com era, during which I had no idea of the Internet. And, they were all useful in the good ol’ [though for me non-existent] Dialup Days. Though they’re of less importance now due to the explosion of Broadband, thumbnails are still useful. So, here’s a simple one line of code that would convert any Image of practically any widely used Format into a Thumbnail of a given size into many widely used Image Formats.

System.Drawing.Image.FromFile _
("c:\MyPicture.png").GetThumbnailImage _
(150, 150, Nothing, System.IntPtr.Zero).Save _
("C:Thumbnail.gif", System.Drawing.Imaging.ImageFormat.Gif)

OK, that’s not one Physical Line, but it is one Logical Line, so that 1 Line Claim still holds:D OK, let’s see what we’re doing here…

First up, we are using the FromFile static Method of the System.Drawing.Image class to load an Image from disk and return an Image Object, with which we immediately call GetThumbnailImage, with the width and height of the Thumbnail, along with a dubious Nothing [Null for C#ers] and a Zero Pointer. I donno why they are there, but the docs said that though they weren’t used, they had to be there. Donno why. Poor Framework Design:P

Anyway, the GetThumbnailImage call returns yet another Image object, on which we call the Save Method with the File Name and the Image Format of the Thumbnail file. Intristically, .NET supports 10 Image Formats. List of them found here

BTW, I made the Code a bit Unreadable using line continuation, inorder for that 1 line Title:D Sorry about that.

And, Where are the comments ?

Comments
6 Comments »
Categories
Tech
Comments rss Comments rss
Trackback Trackback

CSC….

April 14, 2006 | 9:20 pm
Well, CSC is one of those Computer shops that turn out masses of semi-programmers who strive hard to contribute much to the DailyWTF. Yes, there’ll be a Gem hidden somewhere from there, but it mostly turns out the kind of people who write the code that comes up in the DailyWTF. So, why am I writing about them now ?Well, last Tuesday, we had a game of Cricket, and after that, one of my friends, Bala, had fallen prey to hype, and thought that the only way he could survive his life is to learn Java. So, a CSC Scholarship exam was to be held on Wednesday, and he wanted about 6 of us to come with him for the exam, since we were atleast partially interested in that.

So, we went there. Pleasant place. But, something was a bit ominous though. No computers on the outside. But, lots of posters. And, point was, Posters with Spelling Mistakes. Like, this one:

Scholarships available on First come, First Served Basic

Well, not just that. There was another full colour, Professionaly done, A3 Poster proudly saying :

To Get a Job, you don’t have to be an expert in Technology. You have to answer Question in Interview Properly to get Job.

Well, that blew it, and I’d know that an Institution with such a stupid marketing won’t be fit. And, after I saw the PII Machines with 14″ Microtek Monitors, I knew they weren’t going to use Eclipse or IntelliJ or anything else modern, and are going to stick with stupid EDIT and the command line. So, I quit. I advised my friend to Quit, but he was convinced that the only way for him to survive is to learn Java.

Well, let’s watch this Experiment unfold….

Comments
6 Comments »
Categories
India, Lame, Tech
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Contact Me

Email: yuvipanda@gmail.com
IM: yuvipanda@msn.com
GTalk: yuvipanda

My Photos


View my Flickr Page

My Badge


IndiBlogger - Where Indian Blogs Meet

Archives

  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox