Its always a pain when you need to move, and blogger has been good to me so far. It hurts me to move too.
The want of categorised postings, more attractive templates and in general blogging with the elite has made me effect a change. So, for all ardent readers of my blog I am officially moving to a wordpress blog. However, I will still try to keep content posted here once in a while but please update your bookmarks, feed sources and what not to this url hereafterwards.
NEW WORDPRESS URL : http://vishnuvyas.wordpress.com/
However, All articles there will be posted here too, but that is better for navigation if you do use a web interface (eg: Firefox, IE, etc...)
Signing Off,
Vishnu Vyas.
Saturday, November 12, 2005
Friday, November 11, 2005
An Indian Startup for the Price of a Small Car.
I am really interested in developing a web application and it has caught my fascination for a long time. The advantage with web applications is that you really don't have to deploy them in the conventional sense. All you need is a domain name, a hot server and some kick ass internet connection. Being in India, its the third thing would give you more trouble than anything else. So, how much does it really need to get a system running. Though this a lot of armchair entrepruenership and might not be very practicable, but however whats wrong with spending sometime there?
So, for any startup you need an idea, and since ideas come by plenty (note, I am not saying good ideas come by plenty.) we won't really bother about that. If you don't have an idea, there is little point reading this post. You might ask wether do I have an idea yet, the point is yes and no. Yes because I think I have an idea, and no because its practicallity is highly invaluble unless its implemented RIGHT NOW. So thats basically our point 1, You need a good idea. So what now?
Next you need some hardware. But hardware here is cheap, you can get cheapo yet kick ass machines for an investment as small as say buying a small car. Infact, if you have the guts to build your own systems from scratch you can do way better with the amount that you would spend on a car. So lets actually do a small estimate of how much does it really cost. And for the model of a small car we wil take the much loved hyundai santro xing, and in India it costs approximately Rs.2,81,789 (according to the official site of Hyundai). So thats approximately 3 Lakhs we have in our hands and lets see what we can build with that money in terms of servers ready for web applications. Now, before we go ahead we need to look into what a machine for a startup would actually need, or rather the hardware software interdependancy. So lets make things simple here and assume that you're web app would require 3 major software components - a webserver, an application server and a good database (assuming most data is relational). And with that we need 3 types of machines.
The machines running the Webserver and application servers need to give solid live performance in the sense that they need to be scalable. These are the typical types of machines where you would need a processor with a huge cache, clock speed as far as these operations are concerned is basically a moot point. The main bottle neck is actually your cache/ram performance and hence you need to a bit overboard about the RAM requirements of this machine. As far as processors go in terms of availability and performance (going per online reviews) the Intel Xeon HT Dual Core 2.8 Ghz with 2MB L2 cache is the most viable choice and that costs you around Rs.12400, add to that a decent mother board which would set you back by another 5000 rupess and we need as much ram as possible and these boards typically support a maximum of 4 gigs of ram which would costs around Rs.18400. The system would also need some nice hard-disks for disk based caches, a couple of 80 GB in hot-swappable raid should do (yeah, this is only your webserver remember). with a lots of swap space. All other accessories deemed necessary such as an ATX powersupply, a cabinet, the peripherals would cost you approximately another 7500 rupees. Add a couple of network cards to it and it would cost you approximately another 1000 bucks (remember you need 2 network cards for atleast one machine). So lets look at how much our webserver/application server would cost us.
Now that we have a kick ass webserver for approximately 54000 Rupees (actually the price here is kept slightly above bar, it can be made much lesser and it also doubles up as an application server). Now lets look at our second machine, what we need there is lots of hard disk capacity and harddisks are basically cheap there. We can use not so high end processor and we again need lots of RAM but a 1 GIG should do there, a system there can be constructed with approximately 35000 Rs. sans the Harddisks. As far as hard disks go, the fanciest thing you can get here are 300GB SATA harddisks which cost around 7650 Rs each and initially we won't be needing too much space (if we have more users we might turn profitable and can use money from there). So we can set up a bunch of those SATA harddisks (say 4 for RAID level 2) and thats 30600 Rs approximately. So for a sum total of Rs.65600, we can build a really decent database server. we might also need a couple of other small machines for development and testing (these need not be that powerful we can make do with one of the cheap AMD Athlon 2000+ series, which you can get a whole machine for less than Rs.25000) and some power and network infrastructure to manage them all (Switches, gigabit ethernet, UPS etc..) which I estimate would approximately cost another say 75000 rs (another high estimate). So where does it leave our hardware infrastructure investment?
1. Kickass Webserver/Application Server - 53900.00 Rs
2. Database Server with 600G Raid2 - 65600.00 Rs
3. Development/Testing machines(lets say 2) - 50000.00 Rs
4. Network and Power Infrastructure - 75000.00 Rs
Grand Total - 244500.00 Rs.
Price of Hyundai Santro Xing - 281789.00 Rs.
Cash Remaining 37289.00 Rs.
Not bad, hardware for a small start up and some change too. And with a domain name costing approximately 500 Rs a year, its not a bad bargain after all. Now all we have to do is look for the kickass internet connection.
Vishnu Vyas.
So, for any startup you need an idea, and since ideas come by plenty (note, I am not saying good ideas come by plenty.) we won't really bother about that. If you don't have an idea, there is little point reading this post. You might ask wether do I have an idea yet, the point is yes and no. Yes because I think I have an idea, and no because its practicallity is highly invaluble unless its implemented RIGHT NOW. So thats basically our point 1, You need a good idea. So what now?
Next you need some hardware. But hardware here is cheap, you can get cheapo yet kick ass machines for an investment as small as say buying a small car. Infact, if you have the guts to build your own systems from scratch you can do way better with the amount that you would spend on a car. So lets actually do a small estimate of how much does it really cost. And for the model of a small car we wil take the much loved hyundai santro xing, and in India it costs approximately Rs.2,81,789 (according to the official site of Hyundai). So thats approximately 3 Lakhs we have in our hands and lets see what we can build with that money in terms of servers ready for web applications. Now, before we go ahead we need to look into what a machine for a startup would actually need, or rather the hardware software interdependancy. So lets make things simple here and assume that you're web app would require 3 major software components - a webserver, an application server and a good database (assuming most data is relational). And with that we need 3 types of machines.
The machines running the Webserver and application servers need to give solid live performance in the sense that they need to be scalable. These are the typical types of machines where you would need a processor with a huge cache, clock speed as far as these operations are concerned is basically a moot point. The main bottle neck is actually your cache/ram performance and hence you need to a bit overboard about the RAM requirements of this machine. As far as processors go in terms of availability and performance (going per online reviews) the Intel Xeon HT Dual Core 2.8 Ghz with 2MB L2 cache is the most viable choice and that costs you around Rs.12400, add to that a decent mother board which would set you back by another 5000 rupess and we need as much ram as possible and these boards typically support a maximum of 4 gigs of ram which would costs around Rs.18400. The system would also need some nice hard-disks for disk based caches, a couple of 80 GB in hot-swappable raid should do (yeah, this is only your webserver remember). with a lots of swap space. All other accessories deemed necessary such as an ATX powersupply, a cabinet, the peripherals would cost you approximately another 7500 rupees. Add a couple of network cards to it and it would cost you approximately another 1000 bucks (remember you need 2 network cards for atleast one machine). So lets look at how much our webserver/application server would cost us.
Now that we have a kick ass webserver for approximately 54000 Rupees (actually the price here is kept slightly above bar, it can be made much lesser and it also doubles up as an application server). Now lets look at our second machine, what we need there is lots of hard disk capacity and harddisks are basically cheap there. We can use not so high end processor and we again need lots of RAM but a 1 GIG should do there, a system there can be constructed with approximately 35000 Rs. sans the Harddisks. As far as hard disks go, the fanciest thing you can get here are 300GB SATA harddisks which cost around 7650 Rs each and initially we won't be needing too much space (if we have more users we might turn profitable and can use money from there). So we can set up a bunch of those SATA harddisks (say 4 for RAID level 2) and thats 30600 Rs approximately. So for a sum total of Rs.65600, we can build a really decent database server. we might also need a couple of other small machines for development and testing (these need not be that powerful we can make do with one of the cheap AMD Athlon 2000+ series, which you can get a whole machine for less than Rs.25000) and some power and network infrastructure to manage them all (Switches, gigabit ethernet, UPS etc..) which I estimate would approximately cost another say 75000 rs (another high estimate). So where does it leave our hardware infrastructure investment?
1. Kickass Webserver/Application Server - 53900.00 Rs
2. Database Server with 600G Raid2 - 65600.00 Rs
3. Development/Testing machines(lets say 2) - 50000.00 Rs
4. Network and Power Infrastructure - 75000.00 Rs
Grand Total - 244500.00 Rs.
Price of Hyundai Santro Xing - 281789.00 Rs.
Cash Remaining 37289.00 Rs.
Not bad, hardware for a small start up and some change too. And with a domain name costing approximately 500 Rs a year, its not a bad bargain after all. Now all we have to do is look for the kickass internet connection.
Signing Off,
Vishnu Vyas.
Thursday, November 10, 2005
The irony that is life.
One whole night's work and you have a brand new template. Featuring smoothing colors, better cross-browser compatibility and a better navigation bar. Yes, for the audience of this blog, (yes, I mean all 3 of you) I present you "Angkor Vat" (thats what this template is called, if you din't know).
Now, why is life an irony? Because one whole night's toil later I get an invite from wordpress.com.
To move or not to move, that is the question!.
Update 1 : If someone is intersted in using this template for their blog, please go ahead and use it, also drop a mail if you do use it.
Signing Off,
Vishnu Vyas.
Now, why is life an irony? Because one whole night's toil later I get an invite from wordpress.com.
To move or not to move, that is the question!.
Update 1 : If someone is intersted in using this template for their blog, please go ahead and use it, also drop a mail if you do use it.
Signing Off,
Vishnu Vyas.
Wednesday, November 09, 2005
Experiments with Text Similarity.
If you do read the intercodes blog then you might have had some vauge hint of me having a 'censored' project, but thats not really that censored.. and I have discussed about that on this blog before. However, seeing some competition right before my eyes, sort-a gave me a rude awakening.(btw, I also registered there to check it out).
And one of the things that is required for that project (apart from a realistic deadline, and and some kick-ass commitment) is a good automated text-similarity algorithm. not the Text::Similarity types (you would know that if you had something to do with perl), but something on a more fundamental level. Approaches which basically match documents on semantic content. So, I basically experimented with some basic algorithms and here are some results. So whatever I've come up with ain't so promising .. but thats just very basic single nights hacking. If anyone else is interested they can of course use the code. its on the MIT Licencse (i.e.. take the code, and don't blame me if loose your hair and your wife runs away.) Since these are just experiments.. we won't care too much about efficiency of code, but rather on getting there.
So each of the textual matter in question is basically stored in flat out text files with no extra formatting around. Just the post content. so we need a quick and dirty function to read stuff from a file and convert it into a list of non-repeating words. Thats easy enough, if we define a small helper function to split a string on space. (for all those who know the Common Lisp Ansi Spec on the top of your heads, is there a better way to do this?)
so here is the splitter function.
well, now that we can successfuly split strings into their component words, assuming they are seperated by spaces. (usually they are not, but this will have to do for now), we can write our function which swallows a file whole and gives us a list of words occuring in the file.
Since we are assuming its primarily textual data (kadhai in local-speak), its safe to assume the data is line oriented. (note-to-self : a better way would be to read that into a string buffer and then split-on-space the stringbuffer). Also, there is this small key value remove-small which by default is set to t. remove-small is a small flag which decides if words of length lesser than 3 are included or not. the default value of 't' is not such a wise idea, as I learnt later. The reason being most geek-speak and abbreviations are 3 lettered (eg: C++, AST, GC, SCM, DOS, WIN,NIX). So, reading this way would perform badly on textual content with a degree of code in them (like this one).
Since its a really good idea to generate a frequency table and we can easily combine that with the process of removing repeated words. So to get the job done quick and dirty, I am using an a-list here, but for larger sets a hash table would give better peformance.
The above function is defined to be a bit more generic than it needs to. One simplification could be made on the equals-function defaulting to #'string=. Now that we have our alist based frequency table.. we can check out a whole bunch of measures, now we will look at two really disappointing ones, but not totally. They gave me some quick insight into the nature of random textual matter as opposed to more sophisticated and rather correct techniques.
So, we will first look at the common word count, but its also usually helpful if we know what are the common words.
This isn't particularly useful for identifying positives, as it gets in lots of false positives through, and further more the usefullness of this is limited by general english words such as which, where, therefore which occour much more commonly than what would be considered as the words containing actual content. (I would consider these words as semantic indicators, rather than contentful words). So the next obvious experiment is to look at the common words and their frequencies, so if there is some difference that should iron out. (like there is high probability that words like 'which' will be used approximately the same number of times, so taking a difference of frequency should fix that). So, we will write a small function, basically an imporvement over the above one.
Hmm.. but the results aren't too suprising.. It seems, even though posts of similar topics do have these words in common, they aren't used similarly enough to actually use 'difference' of frequencies viabily. but all is not lost, atleast there are a couple of important lessons to learn about the whole text similarity thing.
And if any one's reading this blog, and have some suggestions or things I can look into (preferably with solid data to back stuff up..) please do mail me.
Signing Off,
Vishnu Vyas.
And one of the things that is required for that project (apart from a realistic deadline, and and some kick-ass commitment) is a good automated text-similarity algorithm. not the Text::Similarity types (you would know that if you had something to do with perl), but something on a more fundamental level. Approaches which basically match documents on semantic content. So, I basically experimented with some basic algorithms and here are some results. So whatever I've come up with ain't so promising .. but thats just very basic single nights hacking. If anyone else is interested they can of course use the code. its on the MIT Licencse (i.e.. take the code, and don't blame me if loose your hair and your wife runs away.) Since these are just experiments.. we won't care too much about efficiency of code, but rather on getting there.
So each of the textual matter in question is basically stored in flat out text files with no extra formatting around. Just the post content. so we need a quick and dirty function to read stuff from a file and convert it into a list of non-repeating words. Thats easy enough, if we define a small helper function to split a string on space. (for all those who know the Common Lisp Ansi Spec on the top of your heads, is there a better way to do this?)
so here is the splitter function.
(defun split-on-space (input-string)
"splits the input string on space into a list of strings"
(let ((old-pos 0) (inspace nil) (ret ()))
(loop for char across input-string
for position from 0
if (or (not (graphic-char-p char)) (char= #\Space char))
do (unless inspace
(setq inspace t)
(if (eql old-pos position) (values)
(push (subseq input-string old-pos position) ret)))
else
do (when inspace
(setq inspace nil)
(if (eql old-pos position) (values)
(setq old-pos position)))
finally (return
(progn (unless inspace
(push (subseq input-string old-pos) ret))
(nreverse ret))))))
well, now that we can successfuly split strings into their component words, assuming they are seperated by spaces. (usually they are not, but this will have to do for now), we can write our function which swallows a file whole and gives us a list of words occuring in the file.
(defun read-from-file (filename &key (remove-small t))
"reads a text file and splits it into a list of words"
(with-open-file (file filename :direction :input)
(do ((line (read-line file nil) (read-line file nil))
(words ()))
((null line) (nreverse words))
(dolist (word (split-on-space line))
(if (and remove-small (> (length word) 3))
(push word words))))))
Since we are assuming its primarily textual data (kadhai in local-speak), its safe to assume the data is line oriented. (note-to-self : a better way would be to read that into a string buffer and then split-on-space the stringbuffer). Also, there is this small key value remove-small which by default is set to t. remove-small is a small flag which decides if words of length lesser than 3 are included or not. the default value of 't' is not such a wise idea, as I learnt later. The reason being most geek-speak and abbreviations are 3 lettered (eg: C++, AST, GC, SCM, DOS, WIN,NIX). So, reading this way would perform badly on textual content with a degree of code in them (like this one).
Since its a really good idea to generate a frequency table and we can easily combine that with the process of removing repeated words. So to get the job done quick and dirty, I am using an a-list here, but for larger sets a hash table would give better peformance.
(defun generate-freqtab (object-list equals-function)
"generate-freqtab object-list equals-function, uses the equals-function for
comparison and returns an a-list of objects and their relative frequencies"
(let ((frequency-table ()))
(dolist (item object-list frequency-table)
(if (null (assoc item frequency-table :test equals-function))
(push (cons item 1) frequency-table)
(incf (cdr (assoc item frequency-table :test equals-function)))))))
The above function is defined to be a bit more generic than it needs to. One simplification could be made on the equals-function defaulting to #'string=. Now that we have our alist based frequency table.. we can check out a whole bunch of measures, now we will look at two really disappointing ones, but not totally. They gave me some quick insight into the nature of random textual matter as opposed to more sophisticated and rather correct techniques.
So, we will first look at the common word count, but its also usually helpful if we know what are the common words.
(defun n-similarity (ftab1 ftab2 equals-function)
"counts the number of datum that are present in both the frequency tables
frequency values are ingored for the moment."
(let ((n 0) (common-words ()))
(dolist (word ftab1 (values common-words n))
(if (assoc (car word) ftab2 :test equals-function)
(progn
(incf n)
(push (car word) common-words))))))
This isn't particularly useful for identifying positives, as it gets in lots of false positives through, and further more the usefullness of this is limited by general english words such as which, where, therefore which occour much more commonly than what would be considered as the words containing actual content. (I would consider these words as semantic indicators, rather than contentful words). So the next obvious experiment is to look at the common words and their frequencies, so if there is some difference that should iron out. (like there is high probability that words like 'which' will be used approximately the same number of times, so taking a difference of frequency should fix that). So, we will write a small function, basically an imporvement over the above one.
(defun nf-similarity (ftab1 ftab2 equals-function)
"counts the number and frequency of datam that are present in both the tables
and builds small list of list out of it."
(let ((nf-list ()))
(dolist (word ftab1 nf-list)
(let ((second-word (assoc (car word) ftab2 :test equals-function)))
(if second-word
(push (list (car word) (cdr word) (cdr second-word)) nf-list))))))
Hmm.. but the results aren't too suprising.. It seems, even though posts of similar topics do have these words in common, they aren't used similarly enough to actually use 'difference' of frequencies viabily. but all is not lost, atleast there are a couple of important lessons to learn about the whole text similarity thing.
- You can't ignore small words because, they might be important after all.
- You can't use word occurances blindly because english has more snytactic crap than Java does!!
- And, you can't uses frequencies blindly because, english is a very quirky language that allows even semantically similar topics to be written in a weirdly different ways.
- This needs a much more fancy research schedule!
And if any one's reading this blog, and have some suggestions or things I can look into (preferably with solid data to back stuff up..) please do mail me.
Signing Off,
Vishnu Vyas.
Monday, November 07, 2005
Guess who's blogging?
This is a sriramish post, welcoming people into the world of blogging, but guess the blogging wave has caught a lot more people than I initially thought. And the techno-phile geek, cubicle lover dilbert creater scott adams is blogging!.
So, ladies and gentlemen here for your entertainment and enlightenment (not necessarily in that order).....
Scott Adams.
So, ladies and gentlemen here for your entertainment and enlightenment (not necessarily in that order).....
Scott Adams.
Saturday, November 05, 2005
Its just syntax, or is it?
Holy wars abound in the lore of geekdom. Fans of a particular programming language waiting to castrate their brothers in profession, just because they use a different language. You can call this racisim of sorts, but its based on syntax or rather the programming language in question. The members of the big ones like Java/C++/Perl go to war with each other, while they are more than content with conducting witch-hunts for the patrons of less popular syntaxes. (I would give an exception for lisp - an average lispnik's arrogance usually forms the "force field" to ward off any war that might come their way).
But incindently, many fail to understand that its just syntax. Yes, language is important in the sense that it is the way in which you 'talk' to the computer. The better vocabulary it has, the better it is. But again, its just syntax. And this thought has been ringing in my mind ever since I started out with lisp. I was comfortable doing all my programming in Java without macros. Now, I cannot live without them, every other language is incredibily constraining. So, syntax has more to it that I initially thought. And this was one of the reasons that motivated the common virtual machine which should make it easy for implementation of other languages over it. The virtual machine provides a basic set of primitives that can be used by the compilers to generate code for the virtual machine, which the virtual machine can then execute.
My virtual machine apart, what was the most amazing thing so far was that, most of my thoughts were echoed by Mr.Sridhar Vembu of AdventNet. His Deluge system which is more centered on deployment of web applications, is basically very similar, however, it represents all its items as tables. Everything from the code to the data it manipulates. Though it solves a lot of problems (like R-O mapping, etc..) one of the things that caught my fascination in the system was that, it has this underlying theme of "Its just syntax". So ones who would want to use 'code-writing' code style macros with lots of paranthesis are free to do so, while others who are more than happy with VB style code can go ahead and code. The internal representaion of code is in the form of tables. (Though *I* would feel a tree-structure is more natural, I guess there there is a trade-off there between uniform representation and what feels natural).The whole thing has one common internal representation which can be converted to your favourite synatx and back to the internal representation seamlessly.
Now, that solves the syntax problem, but what bothers me now is the continuim problem (I gave it that name.. so you won't find that anwhere else). So what is this continium problem? Its explaination is a bit more involved, but here is it.
Any programming team, can certainly benifit if it has 'god level' programmers. Usually, those god level programmers are those that don't mind using a weirder language if it can offer the power they want. If one problem can be solved quickly with a certain style natural to the programming languge, they would have no problems doing that. Given, that they have seamless interoperability, it might be very natural to write different parts of a problem in different syntaxes. The harder (and thus more expressive/cryptic syntaxes) are the ones that might end up giving high productivity. So any profitable enterprise needs people with high productivity.
On the other hand, new recruits are part and parcel of business. Its easier if the newbies start out with much more english like and friendlier syntax than say something that looks like 'fingernail clippings in oatmeal', so again it brings down the training costs, or rather spreads it out. Now the problem as I can see it comes from something I guess is part of human nature. Complacency. What happens if the newbie is comfortable with the current language, he might get the job done, with the same quality as what an expert would have done (I am assuming the newbie doesn't skip on basic discipline like error checking, etc.). But what if he had used the same tools/syntax that the expert had used. He could have finished the product faster, and easier.
So the problem is, again in syntax, or in this case a series of syntaxes that can make a newbie's transition smooth to that of the expert domain. A series of syntaxes so that a newbie can learn and slowly grow out of. In the process of learning more powerful (and hence cryptic in some-way), consturcts and concepts, the transition is smooth and as natural as possible. So thats the problem I guess we should be looking at. The problems in programming languages have moved from hardware to mushware (human brains). And we need to find solutions to appease mushware.
Signing Off,
Vishnu Vyas.
But incindently, many fail to understand that its just syntax. Yes, language is important in the sense that it is the way in which you 'talk' to the computer. The better vocabulary it has, the better it is. But again, its just syntax. And this thought has been ringing in my mind ever since I started out with lisp. I was comfortable doing all my programming in Java without macros. Now, I cannot live without them, every other language is incredibily constraining. So, syntax has more to it that I initially thought. And this was one of the reasons that motivated the common virtual machine which should make it easy for implementation of other languages over it. The virtual machine provides a basic set of primitives that can be used by the compilers to generate code for the virtual machine, which the virtual machine can then execute.
My virtual machine apart, what was the most amazing thing so far was that, most of my thoughts were echoed by Mr.Sridhar Vembu of AdventNet. His Deluge system which is more centered on deployment of web applications, is basically very similar, however, it represents all its items as tables. Everything from the code to the data it manipulates. Though it solves a lot of problems (like R-O mapping, etc..) one of the things that caught my fascination in the system was that, it has this underlying theme of "Its just syntax". So ones who would want to use 'code-writing' code style macros with lots of paranthesis are free to do so, while others who are more than happy with VB style code can go ahead and code. The internal representaion of code is in the form of tables. (Though *I* would feel a tree-structure is more natural, I guess there there is a trade-off there between uniform representation and what feels natural).The whole thing has one common internal representation which can be converted to your favourite synatx and back to the internal representation seamlessly.
Now, that solves the syntax problem, but what bothers me now is the continuim problem (I gave it that name.. so you won't find that anwhere else). So what is this continium problem? Its explaination is a bit more involved, but here is it.
Any programming team, can certainly benifit if it has 'god level' programmers. Usually, those god level programmers are those that don't mind using a weirder language if it can offer the power they want. If one problem can be solved quickly with a certain style natural to the programming languge, they would have no problems doing that. Given, that they have seamless interoperability, it might be very natural to write different parts of a problem in different syntaxes. The harder (and thus more expressive/cryptic syntaxes) are the ones that might end up giving high productivity. So any profitable enterprise needs people with high productivity.
On the other hand, new recruits are part and parcel of business. Its easier if the newbies start out with much more english like and friendlier syntax than say something that looks like 'fingernail clippings in oatmeal', so again it brings down the training costs, or rather spreads it out. Now the problem as I can see it comes from something I guess is part of human nature. Complacency. What happens if the newbie is comfortable with the current language, he might get the job done, with the same quality as what an expert would have done (I am assuming the newbie doesn't skip on basic discipline like error checking, etc.). But what if he had used the same tools/syntax that the expert had used. He could have finished the product faster, and easier.
So the problem is, again in syntax, or in this case a series of syntaxes that can make a newbie's transition smooth to that of the expert domain. A series of syntaxes so that a newbie can learn and slowly grow out of. In the process of learning more powerful (and hence cryptic in some-way), consturcts and concepts, the transition is smooth and as natural as possible. So thats the problem I guess we should be looking at. The problems in programming languages have moved from hardware to mushware (human brains). And we need to find solutions to appease mushware.
Signing Off,
Vishnu Vyas.
Sunday, October 23, 2005
Teachers? - Bah Humbug!!.
"We don’t need no education.
We don’t need no thought control.
No dark sarcasm in the classroom.
Teacher, leave those kids alone.
Hey, teacher, leave those kids alone!
All in all it’s just another brick in the wall.
All in all you’re just another brick in the wall."
- Pink Floyd.
With the IIPM debate raging all over the blogsphere, what struck me about this issue is not the issue per se, but my stronger reactions to this issue than anything else. This is not the first time this is happening, Free Speech has been a victim of persecution before, in public, in newspapers, in television, and why even in blogsphere with the 'Mediaah!' issue.
But my reactions are different now, I was fuming in indignation then and I am fuming with indignation now. But now its intensity is higher, stronger, and infact feels more personal. And a little reflection reveals that all this intensity is not because Gaurav resigned, No it is not. I appreciate the guy for standing by his principles but just that Its not the reason why this is personal. Nor is it because that Rashmi has got really sexist comments on her blog. I was born into a culture which talks a lot about the greatness of feminity and silently ignores when a random female gets eve-teased on the street. I am innured to its ways, and no the comments on her blog don't affect me on the scale which this issue affected me.
And btw, dict.org doesn't have any meanings for any form of the word 'eve-teased', that brings me to the question of is it so prominent in our culture that we actually need to invent a word to discuss it? But I digress.
The true reason, as introspection reveals , seems to be the fact that I feel that I am a victim of this issue. And how you may ask? How does a student of computer science, studying in an engineering college down south is affected and is the victim of a massive con-operation run somewhere in northern india by dubious academic hooligans? Well the answer is simple - I, as every student out there is part of this devious web spun by power and money, conning people into feeding crap and calling it education.
So far starters, the institution I study is fully accredited and the degrees are bonafide degrees awarded by an institution recognised by AICTE, UGC, and all the other people on these boards who sleep, jerk off and fool around with their secerateries instead of doing their jobs. Yes, in sometime I will be walking out with a degree that would proclaim me to the world as an engineer, who successfuly has faced the rigour of an 'engineering education' and is ready to take on the world. For the more yo! dude types, add a 'Give it to me baby!' here.
So why all this fuss and unnecessary ranting you may ask, well because my degree might look valuble in the eyes of a prospective employer, but my conscience would look upon it disdainfully as some piece of used toilet paper. The reason I took computer science was more personal and the so called IT boom had nothing to do with it. If computer science were in a state where it would get me janatorial positions, I would still have taken it, I took it for the sheer mental orgasms that I recieved every time I got a program working, I took it out of love... or so I thought. How naive of me!!.
The state of education is in atrophy and is getting worse. My heart pains as if a needle is being poked into it, every time I see my favourite subject being raped. Every time I hear English is a CFG. Every time I hear some fuckhead thinking (aloud, may i add) C is all computer science is about. Everytime I hear the same fuckhead talking about astrology, and claiming it to be *proven scientific fact*. Every time I hear the number 2 is neither prime nor composite, and every single time when a reference is quoted to that fact(oid?). Every single fucking time that I hear 0*0 is indeterminate. And it pains me even more to find myself helpless to do anything about it.
In a culture that puts the position of a teacher before god, is this something what we should expect? Fucked up psychotic ignoramuses for that position? As I can see, the job of a teacher is first Inspire, and then Imbibe. Not that I'vent seen good teachers (yes, I have seen one in my life so far, and thats how I can tell the difference), but everyone in the past four years of my undergraduation have been total losers. And not to mention that the fact that the curriculum is not to blame. Infact, I would personally consider the average undergraduation curriculum in computer science is pretty upto the mark. But whats the use when the whole point of 'Computer Science' is missed? When was the last time that any of us had an enthusiastic teacher, when was the last time we actually had a teacher? How many of has have met the likes of a good teacher, say someone like this guy.
Come to think of it, what is the difference between someone like me and someone from IIPM?
We get fed crap about computer science is, and they get fed crap about what management is - simple!.
Signing Off,
Vishnu Vyas.
Wednesday, October 19, 2005
Making computers think logically, The new and imporved version.
The previous post about solving CNF using a bit of common lisp was something that transpired out of a conversation with Vivek. The previous program even though was functionaly good, lacked a certain sense of aesthetics that lisp programs should have. So with a little more effort, and some help from Thomas.F.Burdick from c.l.l, here is the new and imporved version.
Upadte 1: Fixed 2 bugs in code.
Update 2 : Found destructuring more efficient than comparing with the last element.
hence xform can be written as.
Technorati Tag: lisp
Signing Off,
Vishnu Vyas
;; CNF Solver, ver 2.0
;; Same functionality as the previous one
;; but is better in that its easier to work.
;; Thanks to a little help from Thomas.F.Brudrick
(defpackage :cnf
(:use :common-lisp)
(:export resovle))
(in-package :cnf)
(defun seperate-parts (expr)
"seperate the epxression into negated and non negated variables"
(loop for s = (pop expr)
if (eql s 'or)
do (values)
else if (eql s 'not)
collect (pop expr) into vneg
else collect s into v
while expr
finally return (values v vneg)))
(defun resolve-pair (expr1 expr2)
"resolves a pair of cnf expressions."
(flet
; xform is a formatting function which is used to take a list
; of symbols and convert them into a list of symbols padded
; appropriately with the pre and post symbols.
((xform (list pre post)
(let ((x (car (last list))))
(loop for item in list
if (eql item x) nconc (nconc (when pre (list pre))
(list item))
else nconc (nconc (when pre (list pre))
(list item)
(list post))))))
(multiple-value-bind (list1 nlist1) (seperate-parts expr1)
(multiple-value-bind (list2 nlist2) (seperate-parts expr2)
;rem is the set of variables that cancel out.
;allp is the set of all non-negated symbols.
;alln is the set of all negated symbols.
(let* ((rem (union (intersection list1 nlist2)
(intersection list2 nlist1)))
(allp (set-difference (union list1 list2) rem))
(alln (set-difference (union nlist1 nlist2) rem)))
(nconc (xform allp '() 'or)
(when alln
(nconc (list 'or)
(xform alln 'not 'or)))))))))
(defmacro resolve (exprlist)
"resolves a list of CNF expressions"
`(reduce #'resolve-pair ,exprlist))
;; (end-package :cnf)
Upadte 1: Fixed 2 bugs in code.
Update 2 : Found destructuring more efficient than comparing with the last element.
hence xform can be written as.
;; xform is a formatting function which is used to take a list
;; of symbols and convert them into a list of symbols padded
;; appropriately with the pre and post symbols.
((xform (list pre post)
(loop for (item . morep) on list
if morep nconc (nconc (when pre (list pre))
(list item)
(when post (list post)))
else nconc (nconc (when pre (list pre))
(list item)))))
Technorati Tag: lisp
Signing Off,
Vishnu Vyas
Making computers think logically.
Conjunctive Normal Forms or CNF's as they are called are simply boolean expressions which are stuck together by conjunctions (and's) and by themselves each subexpressions is a bunch of variables (both negated and non-negated) which are strung toghether by or's. So whats the use of CNF's you ask. well for one thing they allow computers to think logically and make decisions.
Here is a small program which does exactly that. Solves CNF's. An explaination of the program is for another post of its own.
Update : The old code had some bugs which din't work in certain cases, so the code now is updated.
Technorati tag : lisp
Signing off,
Vishnu Vyas.
Here is a small program which does exactly that. Solves CNF's. An explaination of the program is for another post of its own.
;;; Solves CNF forms
;;; the macro resolve-list takes as input a list of the form
;;; ((expr1) (expr2) (expr3) ... )
;;; where each expr is of the the form ( var1 or var2 or ... not varN ...or varK )
(defpackage :cnf
(:use :common-lisp)
(:export resolve-list))
(in-package :cnf)
;;; function seperate-parts.
;;; Seperate parts splits the expression into variables that are negated and those that
;;; are not negated.
(defun seperate-parts (expr1)
"Seperates the negated variables and the non-negated variables"
(let ((list-v ())
(list-vneg ())
(next ()))
(dolist (iter expr1)
(cond
((eq 'or iter) ())
((eq 'not iter) (setf next t))
(t (if next
(progn
(push iter list-vneg)
(setf next ()))
(push iter list-v)))))
(values list-v list-vneg)))
;;; function resolve-pair
;;; uses basic laws of logic to resolve 2 boolean expressions containing only
;;; or's or not's.
(defun resolve-pair (expr1 expr2)
"Resolves a pair of conjunctive expressions"
(let ((list1 ())
(list2 ())
(nlist1 ())
(nlist2 ()))
(multiple-value-bind (lst nlst)
(seperate-parts expr1)
(setf list1 lst)
(setf nlist1 nlst))
(multiple-value-bind (lst nlst)
(seperate-parts expr2)
(setf list2 lst)
(setf nlist2 nlst))
;; rem-list is the list of variables that cancel out due to negation.
;; allp-list is the list of variables that are not negated and can occour in the final expression
;; alln-list is the list of variables that are negated and can occour in the final expression
;; red-list1 is the pretty version of allp-list with the or's in place
;; red-list2 is the pretty version of alln-list with the or's and not's in place.
(let* ((rem-list (union (intersection list1 nlist2)
(intersection list2 nlist1)))
(allp-list (remove-if #'(lambda (x) (if (member x rem-list) t nil))
(union list1 list2)))
(alln-list (remove-if #'(lambda (x) (if (member x rem-list) t nil))
(union nlist1 nlist2)))
(red-list1 ())
(red-list2 ()))
(dolist (pitm allp-list)
(push pitm red-list1)
(push 'or red-list1))
(dolist (pitm alln-list)
(push 'not red-list2)
(push pitm red-list2)
(push 'or red-list2))
;; since there is an extra or/not at the end.. which comes as the first element..
;; we can skip it and hence only the cdr of the list is returned.
(delete 'or (nreverse (concatenate 'list red-list1 red-list2)) :count 1 :from-end t))))
(defmacro resolve-list (exprlist)
"resolves a list of cnf's"
`(reduce #'resolve-pair ,exprlist))
;;(end-package :cnf)
Update : The old code had some bugs which din't work in certain cases, so the code now is updated.
Technorati tag : lisp
Signing off,
Vishnu Vyas.
Monday, October 17, 2005
Dare to Think? - The IIPM Debacle.
I've been too much of a lispnik these days and less of the usual rants (maybe proportional to more hacking). But only recently I stumbled upon the IIPM debacle which is happening all over blogsphere (Seems even NDTV did a coverage on this). I have always lamented about the pathetic state of Indian engineering education, but it seems that the world of Management education is infested with a bunch of fradulent institutions and the fact that most of them behave in such an utterly despicable manner makes one wonder wether these megolomaniacal idiots should even be allowed to roam free in a system that seems to value the principles of freedom?
Whats the point in blowing our trumpets hard on being the 'Biggest Democracy in the World', when people can't go on practising the fundamental right to 'Freedom of Expression'. Isn't it guaranteed in the constitution? So why back to the usual rants, because of the IIPM vs Bloggers debacle thats unfolding right here in the blogsphere. Here is a small report for the convinence of the readers.
Gaurav Sabnis , a sales manager at IBM blogged (in his personal site) about the questionable authenticity of the claims made by IIPM in their full page ads carried out by various popular newspapers, linking to an article from a small magazine called JAMMAG edited by Rashmi Bansal. And wah-la!!! for the free country India is, hell bent on honouring the integrity of 'Freedom of Expression' , Gaurav was served a legal notice on counts of defamation and slander. Also, pressure from IIPM evantually made him resign his job, and that too on a matter of principle skyrocketing him to the status of a hero in the blogsphere. Support from the blogsphere was espescially amazing with almost every one who seems to know of this issue raising in unision for the support of the cause. Varun.V.Nair is tracking this issue online. Check that out for more info regarding the whole issue.
My POV :
Shocking! Simply shocking. Being the part of an Indian eductation system, I am not new to the fact that the quality of the education in terms of both the staff and the infrastructure is pitiable. As an example, My school in my opinion had better staff than what my college has. There are certain things that always seem to piss me off with the situation in India.
Firstly education in India is a business, not an institution as most of them claim. With a population of more than 200 million students its a very big market, agreed. But this is the only sector of the business where the whole consumer-producer equillibrium is turned upside down. The fact that these institutions can bully others into taking crap is not only unbelievable, but completely unacceptable.
Fundamental rights of students everywhere are simply stepped upon, and now they have the audacity to send legal notices to some one who is expressing their opinions on a personal blog? Thats undemocratic, anti-libertarian and for heavens sake fucking arrogant.
Now, comming to the IIPM issue, with a byline that goes like 'Dare to dream beyond the IIM's' might be good marketing, but for beating their breasts about for being the 'Best B school' their responses to the supposedly false allegations (accusations?) by serving legal notices that not only seem far below the standards that any self-respecting lawyer would sign his name on, is simply hilarious. The easiest way to put an end to all this controversy is simply by providing hard evidence but IIPM hasn't done it so far, and I guess it can't either.
The only way the 'management gurus' at IIPM decide to fight back seems to be by starting a string of fake blogs with names like 'IIPMStudent9' , 'OracleCoder' (Never knew management graduates had to be writing SQL querries in oracle) and who end up posting rather sexist comments on Rashmi's blog. Really do they even think such comment would get them anywhere if their aim is to clear their names ? What does such allegations achieve - Absolve IIPM of its impotency? Not only are these fake bloggers sullying the names of other IIPM students (making their predicament more unfortunate), but infact making it worse for IIPM itself. Its high time that these people realised that bloggers are smarter than what you think of them to be. But whats most appalling is the fact that the main stream media sans NDTV is almost completely silent. Seems like the fourth estate has stooped so low to become as cheap as say real estate.
But the issue that pisses me off the most here is not the fact that IIPM is a big fraud, or the fact that they are behaving like a bunch of retarded hooligans. But the fact that they have started stepping on the right to free speech. Free speech is the freedom and the right to express what I please, and hear and listen to what I think is appropriate for me. And thats a right that I am at no point of time willing to give up. Blogs provide an ideal medium to express my thoughts and opinions and I would at no point of time see that essential right be allowed to be taken away from me. This holds true for all bloggers, and hence I support the cause of free speech.
So, here is my little contribution for the sake of perserving the Right to Free Speech.
So as bloggers what can we do to support their cause? here is a small list of 3 things you can do.
Signing off,
Vishnu Vyas
Whats the point in blowing our trumpets hard on being the 'Biggest Democracy in the World', when people can't go on practising the fundamental right to 'Freedom of Expression'. Isn't it guaranteed in the constitution? So why back to the usual rants, because of the IIPM vs Bloggers debacle thats unfolding right here in the blogsphere. Here is a small report for the convinence of the readers.
Gaurav Sabnis , a sales manager at IBM blogged (in his personal site) about the questionable authenticity of the claims made by IIPM in their full page ads carried out by various popular newspapers, linking to an article from a small magazine called JAMMAG edited by Rashmi Bansal. And wah-la!!! for the free country India is, hell bent on honouring the integrity of 'Freedom of Expression' , Gaurav was served a legal notice on counts of defamation and slander. Also, pressure from IIPM evantually made him resign his job, and that too on a matter of principle skyrocketing him to the status of a hero in the blogsphere. Support from the blogsphere was espescially amazing with almost every one who seems to know of this issue raising in unision for the support of the cause. Varun.V.Nair is tracking this issue online. Check that out for more info regarding the whole issue.
My POV :
Shocking! Simply shocking. Being the part of an Indian eductation system, I am not new to the fact that the quality of the education in terms of both the staff and the infrastructure is pitiable. As an example, My school in my opinion had better staff than what my college has. There are certain things that always seem to piss me off with the situation in India.
Firstly education in India is a business, not an institution as most of them claim. With a population of more than 200 million students its a very big market, agreed. But this is the only sector of the business where the whole consumer-producer equillibrium is turned upside down. The fact that these institutions can bully others into taking crap is not only unbelievable, but completely unacceptable.
Fundamental rights of students everywhere are simply stepped upon, and now they have the audacity to send legal notices to some one who is expressing their opinions on a personal blog? Thats undemocratic, anti-libertarian and for heavens sake fucking arrogant.
Now, comming to the IIPM issue, with a byline that goes like 'Dare to dream beyond the IIM's' might be good marketing, but for beating their breasts about for being the 'Best B school' their responses to the supposedly false allegations (accusations?) by serving legal notices that not only seem far below the standards that any self-respecting lawyer would sign his name on, is simply hilarious. The easiest way to put an end to all this controversy is simply by providing hard evidence but IIPM hasn't done it so far, and I guess it can't either.
The only way the 'management gurus' at IIPM decide to fight back seems to be by starting a string of fake blogs with names like 'IIPMStudent9' , 'OracleCoder' (Never knew management graduates had to be writing SQL querries in oracle) and who end up posting rather sexist comments on Rashmi's blog. Really do they even think such comment would get them anywhere if their aim is to clear their names ? What does such allegations achieve - Absolve IIPM of its impotency? Not only are these fake bloggers sullying the names of other IIPM students (making their predicament more unfortunate), but infact making it worse for IIPM itself. Its high time that these people realised that bloggers are smarter than what you think of them to be. But whats most appalling is the fact that the main stream media sans NDTV is almost completely silent. Seems like the fourth estate has stooped so low to become as cheap as say real estate.
But the issue that pisses me off the most here is not the fact that IIPM is a big fraud, or the fact that they are behaving like a bunch of retarded hooligans. But the fact that they have started stepping on the right to free speech. Free speech is the freedom and the right to express what I please, and hear and listen to what I think is appropriate for me. And thats a right that I am at no point of time willing to give up. Blogs provide an ideal medium to express my thoughts and opinions and I would at no point of time see that essential right be allowed to be taken away from me. This holds true for all bloggers, and hence I support the cause of free speech.
So, here is my little contribution for the sake of perserving the Right to Free Speech.
I fully support Gaurav and Rashmi for their courage in standing up for their convictions!
So as bloggers what can we do to support their cause? here is a small list of 3 things you can do.
- Blog about this issue
- Link to their posts and ask your readers to give the site a quick peep, maybe we can atleast help those who are looking ahead for management careers by making them realise the truth.
- Support them and the cause for free speech!
Signing off,
Vishnu Vyas
Subscribe to:
Posts (Atom)