Friday, August 17, 2012

Galaxy Note II - Is This It ?

Knowyourmobile just released the following picture of what is supposed to be a leak of the new Galaxy Note II




Even though it looks convincing I have a feeling its a fake, because it looks like the fake image that was released for the Nexus 7 a while back. Also note the image above has the home button and practically no edge at all.

Tuesday, July 24, 2012

Samsung S Voice + Touchwiz



 A while back I had said that because of S -Voice (competing with Google's Google Now), Samsung's take on Jelly Bean might take more time than HTC . If the rumor mills are to be believed S3 owners might see the new version by August.

I am really interested to see how they incorporated Google Now in to touchwiz because I just don't see Samsung give up the "long press" home key to Google Now. For now the best solution that comes to mind is Google Now being a separate app or worse they just dont include it at all.

A thing to note, I have had a Samsung Captivate before and know the target for Froyo went from "just a few months" to "Dec 2010" to sometime late in 2011 after ATT added their delay so I would lean towards them not making this deadline.

Sunday, July 08, 2012

The Next Phone

After Google IO I was quite impressed with what Jellybean had to offer esp Project Butter and Google Now, but I knew that buying a Samsung Galaxy S3 ( I hate the buttons btw, get with the program) or a HTC One X would mean that I wouldn't know when Id get to play with it.

So at that point I decided that getting timely upgrades were more important to me so I got myself the Galaxy Nexus as soon as I/O ended.

So far I'm loving it and cant wait to get Jellybean sometime next week.

 



Tuesday, June 19, 2012

What Google has to deliver with Jellybean




Quite an exciting month for tech news this has been. After Apple & Microsoft next week Google has their I/O Conference where it is very likely we will see the next iteration of Android aka Jelly Bean. As an avid Android fan I'm quite excited to see whats new but feel that there are 2 key things they have to hit out of the park with this release

Innovation : Go above and beyond with features that really set it apart from the competition. With the release of iOS 6 it is now very close to the features that are offered outside the box of Android, just have a look at the chart from this PC World article .







 This time around they have to leap frog ahead with their offerings that makes the ecosystem attractive not only to geeks but to everyday users eg Google Majel - its concept of an assistant and a powerful API , 5 nexus devices ready for all networks completely taking out the carriers from the middle are exactly the type of stuff that has to come out

Control : Jelly Bean comes at a time when Ice Cream Sandwich is at 7% adoption on the devices and even by the time I/O rolls around we can see that number be at 10% or so. Google has to lay out a plan for how upgrades will be handled going forward and work towards minimizing "fragmentation". Take control of their ecosystem, keep the manufacturers and especially the carriers for marring the experience for the user. One way I can think of is the ability to turn off skins from the OS if the user wants the stock experience as that is the one of the biggest hurdles when pushing updates out.

Monday, June 18, 2012

My Phone Timeline


I saw this on the verge forums and figured it would be fun to share my phone time line till now. Feel free to post yours 

Sony Ericsson t60d (circa 2002) - This was my first cell phone and bought it when I started university 




Song Ericsson T226 (circa 2004) - I had this phone for a week before I returned it for the next one. 



Sony Ericsson t610i (circa 2004) - A great looking phone, was also the first to have a camera




Sony Ericsson W550i (circa 2006) - Swivel phone with a whopping 256mb of internal space




Nokia E71 (circa 2008) - Finally after getting tired of waiting for Nokia to ship a phone to the US, I bought  my first smart phone unlocked . Amazing industrial design and still use it today when I go to India. One of the best phones Nokia made


Samsung Captivate (2010) - Android here I come. A great phone and when it came out was no doubt the best on the market. The phone that started it all for Samsungs dominance in Android



Wednesday, June 06, 2012

Is This The Next Nexus Tablet ?

Saw these images about a possible leak for the next tablet from Google. Im going to go with No. Just looks too fake and the second image is definitely some phone with the buttons wiped out


http://phandroid.com/2012/06/06/is-this-googles-asus-made-nexus-7-tablet/

Friday, May 18, 2012

Google Nexus 2013 Prediction



If the wall street journal report is true that Google will release 5 devices under the nexus line , I'll make the following predictions about the news :

1) The manufacturers will be Samsung , Motorola, HTC and Asus . Motorola and Asus will have tablets, Asus won't have a phone
2)  HTC One Nexus, Samsung Galaxy Nexus and Motorola Droid Nexus will be the names of the devices
3)  The devices will be under the google play line of devices powered by android and sold in the play store

Saturday, December 03, 2011

Firefox - The Phoenix That Might Not Rise ?






Just read an interesting article by Ed Bott  => " It hasn’t been a good year for Firefox. Mozilla has lost share to Google, it’s lost the loyalty of enterprise customers, and it’s lost key talent. And a deal with Google that supplied 84% of its revenue last year was scheduled to end in November. Can Firefox avoid a slide into irrelevance?"


$100mn out of $123mn just from Google itself, that sort of dependence is a dangerous position for anyone to be in. The incentive that Google has to renew the deal is to not let Microsoft come in with Bing and not give any market share points in the process, but with Chrome taking over from Firefox in market share a deal could be made although not anywhere near $100 mn .


Even for Microsoft coming in, it would mean paying to compete with their browser Internet Explorer which they have spent a whole lot on trying to revive. But they do want to make Bing a success as well


Its almost a case of Prisoners Dilemma here and the solution to that one would  be that they both don't do anything and take the chance of splitting the user base between them.


I've been using Firefox since it was called Phoenix and am sad to see this happening, but their recent moves have hurt them quite a bit and not having a presence in mobile is another big problem ( I mean even Opera has a great mobile browser, I use it frequently on the Xoom).


Is this a case of the phoenix not rising from the ashes ?

Sunday, November 20, 2011

Dart Experiments

As i play around with Dart, I have added my code to github over here https://github.com/kashifkhan/Dart-Experiments

The idea is to have a cube rotating using different keystrokes ( Based of an old assembly project)

Right now its projecting a cube using canvas. A new build of the dart editor was released today so it should be interesting to see how the JS has evolved.

Wednesday, November 16, 2011

Playing With Dart



When Dart came I was a bit harsh, criticizing the syntax and its closeness to Java. I felt that without even giving it a chance and playing with it that was a bit unfair. So after downloading the new Dart Editor and some sample examples later here are my quick thoughts on it

Whats Good :-

1) For people coming in from the C#/.NET and Java world, this is a great way to get started writing JavaScript and feel at  home. The syntax and styling make it really easy for anyone with those backgrounds to jump in feet first and start working with it

2) The editor is very nice and easy to use. Doesn't get in the way and the auto complete works well. I am not a big fan of Eclipse but this is really nice and easy to use and being minimal takes a lot of the confusing bits of Eclipse out and gets you straight into the nitty gritty

3) Did I mention intellisense ? I love it coming from Visual Studio and feel its important for a developer to have that available. Having a screen split across the screens to see docs as to what options I have with the object is not something I want to do. The editor does a good job here

Whats not Good:

1) Debugging. Those capabilities arent in the IDE right now and having to debug the obscure JS it outputs is a pain. I found myself switching  between Chrome and Firebug to figure out what my syntax errors were. Very annoying. A simple thing such as Lists having a fixed size on init and not being able to extend later is something the compiler should have picked up at compile time

2) The syntax, it just feels "old". I play a lot with Python and CoffeScript and would have liked the syntax to be along those lines ( its not a lot to ask for since the guy who wrote Python works for Google ). Is python still used there ?

3) Dart-to-JS is going to be the popular option here, and I doubt we will see the script type implementing dart as an option in all the major browsers. No way do I see IE implementing this at all. But going from Dart-to-JS does mean you give up on the performance gains that Dart promises running on the Dart VM


So far I think Ill stand with my earlier stance ( esp the syntax, more python please). But this is a .01 Proof of Concept and from the Groups messages it seems like optimizations, tree shaking,  changes to architecture etc are all on the roadmap so my initial opinion are bound to change as the language matures.

Lets see where Google plans to take the language.

Sunday, March 07, 2010

Pygowalla v 0.1

I have gone ahead and released Pygowalla which is a simple wrapper for the Gowalla API  in python .

At this point it wraps the functions documented in the Gowalla API explorer .

Next steps include:

1) Error Handling
2) Implement other apis ( I have heard of some more being listed on their message board )

Sunday, December 27, 2009

Nokia PC Suite Backup Bug for Organizer

A couple of days ago I noticed that the calendar events on my e71 home screen went missing .

The area below [ image courtesy e71fanatics.com] was not showing any of my appointments not even the default "No Calendar Entries Today" . Even the settings under the "work" and "home" mode showed the organizer being an option to display . Playing with those seemed to have no effect .




After searching online , I was able to find people experiencing the same problem ( after they had used the back up option) but had no solution to it . I decided it was time to a factory reset.

I backed up my contacts , calendar entries using the Nokia PC Suite and reset the device . On boot up the screen came up and the organizer entries were visible again . The interesting bit was when i was restoring my contacts and calendar using the pc suite because the display disappeared again !!!!

As an experiment i reset the decide again and restored only the contacts and the display remained the same . I had to do my calendar appointments again manually, but everything is back to normal and my apps were installed.

So anyone else with this problem, the only way i have found so far is to reset the device at this point. If anyone has a better approach than this please let me know.

Sunday, December 20, 2009

Installing QT Mobility on Windows

So i have been playing around with Symbian and QT development on my Windows XP VM .

The foursquareS project that I am trying to work on made a switch to the QT Mobility libraries to take advtange of some of the mobile functionalities ( such as location, maps etc ).

Now the library is great and works well. But installing it can be a little tricky as I discovered this past weekend . Even after moving the pre-built binaries into the proper location i was getting build errors along the lines of "WARNING: Can't find following headers in System Include Path
"

Here are the steps I took to install the libraries properly within my SDK ( Symbian SDK for FP 1 ) and get a build on QT Creator :-

Once you download the zip or tar file, unzip it at the same level and location as the symbian sdk. In my case the sdk was installed at C:\Symbian\9.2 . I unzipped the folder at C:\qt_mobility .
This step was key, because when you run the configure.bat and make the build files it looks in those relative locations for the sdk etc.

At this point if make is in your path, it will copy the files into the appropriate locations and you can check your set up by building the unit tests . You can then follow the steps in the install.txt to move the pre-built libraries .

Hopefully this helps out others running into the same problems I was having .

Friday, December 04, 2009

Setting Up QT Environment For Windows

So one of my main motivations to start blogging again was me regaining interest in mobile development after taking a stab at it with TrafficCam . TrafficCam was pretty awesome for its time because it was bringing back pictures of intersections and providing road conditions for drivers.

So now 3 years later , im working ( hopefully soon ) on another opensource application on the symbian platform using QT for an online service called foursquare .

So before one can get started , setting up the environment properly on windows can be quite a task, so ive written up a short tutorial that will help others set up on windows ( windows xp in my case )

What i learnt that order was key when getting things installed .

1) First based on your phone and target version of symbian get the appropriate SDK . I used the S60 Wikipedia Page to help me out on that .

You can download the appropriate SDK here

2) Install the Open C/C++ plug in for the sdk .

3) After installing the sdk you can head over to the Qt download site and get the latest version of Qt and Qt Creator . Makes sure you install this on the same drive as the SDK .

3) At this point you should be able to launch Qt Creator and use one of the example projects to get started.

By following the order, i found that the editor found all the locations of the builds, sdk by default . Not having to manually set all that is a real time saver .

Thursday, December 03, 2009

Motivation ... Found !!!

Alright so I think I have the motivation again to restart blogging . My next post will start off with that .

Thursday, June 18, 2009

I need to post again, just need the right motivatio

Saturday, March 14, 2009

Project Euler 63

Some more one liner fun.

I first had the program looking like this:-


total = 0
for x in range(1,10):
for n in range(1,51):
if n == len(str(x**n)):
total += 1
print (total)


After a good look, I was able to reduce it to a 1 liner:-


import time
r = time.time()

print(sum(len(str(x**n)) == n for x in range(1,10) for n in range(1,51)))

print ( time.time() - r )


The parenthesis around print sure does require some getting used to.

Project Euler 43

While working on euler functions, i have managed to come up with quite a library of functions that I use to solve problems.

Today I was playing around with Python 3.0 to see how many of the libraries can be converted, refactored or removed while utilizing the new features of python. First one that can potentially go is the permutations function since itertools now has one.

So here is my ( brute force ) solution to 43 using the permutations from itertools . Takes around 15 seconds to execute


import time
from itertools import permutations


def checkForProperty(t):


if (int(t[1:4])%2) != 0:
return False

if(int(t[2:5])%3) != 0:
return False

if (int(t[3:6])%5) != 0:
return False

if(int(t[4:7])%7) != 0:
return False

if(int(t[5:8])%11) != 0:
return False

if(int(t[6:9])%13) != 0:
return False

if(int(t[7:10])%17) != 0:
return False

return True




r = time.time()

print (sum([int(''.join(x)) for x in permutations('1234567890') if x[0] != '0' and checkForProperty(''.join(x))]))

print (time.time() - r)

Sunday, March 08, 2009

Project Euler #41

After a while I went back to Project Euler to solve a problem. Boy those are addicting. Had some fun with the fairly simple #41

The idea was to find the largest n-digit pandigital that is also a prime. A n-digit number is pandigital if it makes use of all the digits 1 to n exactly once

Based on the simple isPrime rule I was able to rule out 8 digit and 9 digit pandigitals. This is because the sum of the numbers is evenly divisible by 9, sum(1..9) = 45 and sum(1..8) = 36. So this left me with the possibility that n <= 7 .

Here is the python code I used to find it:-


def isNPandigital(number):
return set( [int(c) for c in str(number)]) == set(range(1,len(str(number))+1))


t = time.time()
primes = sieve(7654321)
answerSet = []

print "primes generated"

for prime in primes:
if isNPandigital(prime):
answerSet.append(prime)

print max(answerSet)
print time.time() - t

Sunday, January 11, 2009

Opera mini and gmail

why can't I access my gmail accounts via opera mini but fine with the default browser ?
Been playing with the phone a little bit more over this weekend. I found 2 remote programs for S60, one being Salling Clicker and the other called Remote'Em All . Since remote is free ill be trying that and see how is it to set up VLC over wifi.

As for browsers, I tried the default browser, Opera Mini and Skyfire. Skyfire felt very laggy , slow and had some rendering issues. On the other hand opera mini is the superstar, fast rendering and havent come across a problem site yet. The default browser is also good, but if you are going to browse the web Opera Mini is the way to go

Tuesday, January 06, 2009

Remote For Nokia E71

Does any one know of some good software ( freeware :) ) that can act as a remote control for VLC or window media player over the lan ? Been hunting for something on the phone since I watch movies on my laptop connected to a big screen and it would be nice to control the playback over the air from the phone....any ideas ?

Friday, January 02, 2009

New Phone

So after a lot of research I finally went ahead and bought my first Nokia phone, the E71 . I bought it close to a month ago, and love it. Its packed with software and is amazingly good looking as well. Ill start posting more about the applications I have played it and my overall experience as a first time Symbian user after having used pretty much only Sont Ericsson phones in the past.

Wednesday, September 24, 2008

Nokia Tube



I cant wait for this phone to come out. Rumors state Oct 2nd and usually Nokia usually doesnt disappoint. If only the N96 was close to $1200

Wednesday, July 09, 2008

its been ages, but here goes another attempt

is anyone really surprised by the early iphone reviews ?? I mean when the phone was announced it was pretty clear that other than gps and 3g there wasnt a whole lot that you could call new in this phone. Still doesnt mean I wont go buy one, but the samsung and sony are really looking appealing :)

Thursday, May 15, 2008

I need to revive this thing again ..... need more ideas though

Saturday, January 05, 2008

Project Euler 40

One more :)

This one was really easy. Also learnt a thing or two about string concatenations in python when my original techinique of k += str(someInt) was taking way to long as the length of the string increased.

Apparently when wanting to a large number of concatenation, its fast to append to an array and then do a join.

Problem #4o states:-
An irrational decimal fraction is created by concatenating the positive integers:

0.123456789101112131415161718192021...

It can be seen that the 12th digit of the fractional part is 1.

If dn represents the nth digit of the fractional part, find the value of the following expression.

d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000

Solution:-

import time
w = time.time()
d = ''.join([`num` for num in xrange(1,190000)])
print int(d[0])*int(d[9])*int(d[99])*int(d[999])*int(d[9999])*int(d[99999])*int(d[999999])
print time.time() - w

Saturday, December 29, 2007

Project Euler 39

After a long time , but here is another project euler problem that I worked on.

This one was quite fun.

Problem:-
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.

Find the sum of the only eleven primes that are both truncatable from left to right and right to left.

NOTE: 2, 3, 5, and 7 are not considered to be truncatable primes.

Solution:-

Again its a brute force ( takes a while to get the last prime) ,

I use a generator I found online to get the list of primes and then check if it left and right truncatable.


import time
from itertools import ifilter, count

def isPrime(n):
if n == 1:
return False

i = n - 1
while i > 1:
rem = n % i
if rem == 0:
return False
else:
i = i - 1
return True

def truncateLeft(num):

k = num

while k != 0:
k /= 10
if not isPrime(k):
return False
return True


def truncateRight(num):
k = num

while k != 0:
k %=(10**(len(str(k))-1))
if not isPrime(k):
return False
return True

def sieve():
g = count(2)
while True:
prime = g.next()
yield prime
g = ifilter(lambda x, prime=prime: x % prime,g)




candidates = []

t = time.time()

primes = sieve()
start = primes.next()

while len(candidates) != 11:
if truncateLeft(start) and truncateRight(start) and start > 7:
candidates.append(start)
print str(start) + " has been added"
start = primes.next()

print sum(candidates)
print time.time() - t

Thursday, September 20, 2007


Sony Ericsson has some of the best designs for phones, just have a look at this one:-

Saturday, September 01, 2007

I dont even know what to post about anymore, but I will post more often ...... in other news last week I was in New Orleans for company training and now I am a SCRUM Master :)

Friday, August 03, 2007

Project Euler #39

This is my solution for Project Euler #39

its definitely brute force and im sure there is a better way to get the answer, but here we go

Problem:-
f p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.

{20,48,52}, {24,45,51}, {30,40,50}

For which value of p 1000, is the number of solutions maximised?

My Solution:-


import math, time

t = time.time()

maximum = {}

for a in xrange(1,500):
for b in xrange(1,500):
c = math.sqrt(pow(a,2)+pow(b,2))
p = a+b+c
if p == int(p) and p < 1000:
if maximum.has_key(p):
maximum[p] += 1
else:
maximum[p] = 1

e = maximum.keys()
e.sort(cmp = lambda a,b: cmp(maximum[a],maximum[b]))
print e[-1]
print time.time()-t

Friday, July 13, 2007

Namespaces for PHP

I read this kinda late, but namespaces were definitely required in php and now they have been made official http://www.gravitonic.com/blog/archives/000418.html

Thursday, July 05, 2007

Project Euler

I am completely addicted to this site...its all about solving math problems using programming.

Here is the solution to one of the problems

How Many Lychrel Numbers are below 10,000 ? http://projecteuler.net/index.php?section=problems&id=55

my solution in python, which takes abt 39 seconds:-

def lychrel(x):
i = 0
while i < 50:
x += int(str(x)[::-1])
if str(x) == str(x)[::-1]:
return False
i += 1
return True

print len ([x for x in range(1,10000) if lychrel(x)])

Saturday, May 26, 2007

Microsoft Popfly

So today I got an invite for microsoft's popfly . Popfly seems to be msfts take on letting users create mashups, websites , communities etc without typing in a single line of code and is powered by silverlight. The key word here being "user" which means anyone can create a mashup without knowing how things work behind the scenes.

The site is in alpha, and there are definitely some issues that I have come across. But the UI is amazing, it works with firefox ( big plus ! ).

I will be messing around with this and see what mashups I can come up with. Please feel free to add me as a friend ( http://www.popfly.ms/users/Kashif ) and I will post invites for users as soon as I get them :)

Sunday, May 06, 2007

Vice Funds

I read about vice funds a while back on fark.com. From the site the fund invests in alcohol, tobacco, gaming, aerospace and defense stocks. It is an interesting concept because in many ways people are addicted to this stuff and they have had very nice yearly returns ( close to 14.3%/yr ) to back their idea.

Now for anyone who still reads this would you invest in it ? Abhi , I think I already know your answer :)
I need to start posting stuff here again ....

Saturday, February 24, 2007

Roman Numeral Converter

One more codegolf challenge:-

In this challenge, you will be given a number in roman numeral form and must print out its integer value.

( from codegolf)


My latest solution at 129 bytes:-

r,l,s={'M':1000,'D':500,'C':100,'L':50,'X':10,'V':5,'I':1},1000,0
for j in raw_input():s+=r[j]-(0,l*2)[r[j]>l];l=r[j]
print s

Any other ideas ?

Update:

After manzo's comment, I searched a little and came up with this. Right now its at 119 bytes

r,l,s=dict(M=1000,D=500,C=100,L=50,X=10,V=5,I=1),1000,0
for j in raw_input():s+=r[j]-(0,l*2)[r[j]>l];l=r[j]
print s

Saturday, January 06, 2007

Colors for Visual Studio

Having watched a lot of videos featuring textmate, I really liked the color scheme that was being used by a lot of the videos. After some searching I came across Scott Hanselmans blog where he suggests some colors that bring it quite close.

This is what my current setting looks like:-

Any ideas for the colors of the html tag names other than white ?


Friday, December 08, 2006

Codegolf

Ive been working on this codegolf challenge recently which I found quite fun to do (codegolf == accomplish a challenge in code using least amt of lines )

The challenge in question:-

The game of REVERSE requires you to arrange a list of numbers in numerical order from left to right. To move, you tell the computer how many numbers (counting from the left) to reverse. For example, if the current list is 2 3 4 5 1 6 7 8 9 and you reverse 4, the result will be 5 4 3 2 1 6 7 8 9. Now if you reverse 5, you win.

What we're asking you to do is, given a list of numbers in a random order, produce the moves required to arrange them so they end up in numerical order.

(from codegolf.com)



Now Ive been working on this for a couple of hours and the best I can come up with is this ( My language of choice, python):-


[UPDATE #1]: File Size - 181kb

1) Changed the while loop condition

2)A different way of printing, by adding a comma after the last object one can suppress the new line that is automatically added by print in python

3)Removing unnecessary indentation helped on the file size

4)Didnt need the strip function

import re,sys
n = map(int,re.split(" ",sys.stdin.readline()))
l = len(n)
while l:
m = n.index(max(n[0:l])) + 1
n[:m] = n[m-1::-1]
n[:l] = n[l-1::-1]
print m,l,
l -= 1


[ORIGINAL]


import re,sys
n = map(int,re.split(" ",str(sys.stdin.readline()).strip()))
l = len(n)
while n != sorted(n):
m = n.index(max(n[0:l])) + 1
n[:m] = n[m-1::-1]
n[:l] = n[l-1::-1]
print m,"\n",l
l -= 1


the algorithm works in the following way:-

given a list, get its length

find the index of the maximum value within it, do a reverse from 0 to the index, so now the max is in front (and the move being the index + 1)

then do a reverse again on the length of the list , bringing the max to the end of the list (now the move after that being the length of the list)

decrease the length, so you iterate over a smaller list and repeat the same steps on the smaller section of the list


Anyone have anymore ideas to make this shorter ( either the program itself or the algorithm ) ?

Saturday, December 02, 2006

C-USA Champions


That was a fantastic game yesterday. Had a lot of fun ... definitely need more pictures

Thursday, October 05, 2006

Cant argue with this

"You’ve achieved success in your field when you don’t know whether what you’re doing is work or play." - Warren Beatty

Saturday, September 23, 2006

Learning Python

Just started to pick up on Python,

I am sure everyone who took COSC 2320 with Dr. Anderson remembers the word count program. Well after going through some of the tutorials of python here is the same program in python

Not only is it smaller, but its also easier to understand. Hopefully more to follow


import re
import string

#dictionary to store words and their counts
word_count = {}

#read in text document line by line
for line in open("trial.txt").readlines():

#remove leading and trailing whitespace
line = string.strip(line)

#split the string into words
#based on whitespace, punctuation, digits
for word in re.split("["+string.whitespace+string.punctuation+string.digits+"]",line):

#make the word lower case
word = string.lower(word)

#check if it is actually a word
if re.match("^["+string.lowercase+"]+$",word):

#increment count if true
if word_count.has_key(word):
word_count[word]+=1

#else add entry
else:
word_count[word] = 1

for w in word_count:
print w, ":" ,word_count[w]



Edit: Some more playing around


import re
import string

word_count = {}

text = open("trial.txt").read();

#list of words delimited by whitespace, punctuation and digits
#iterate by words in returned list from split
#lower case all the words in the text
words = re.split("["+string.whitespace+string.punctuation+string.digits+"]",string.lower(text))

#go through the list
for i in range(0,len(words)-1):

#as long as the word in the list is a word and is not already a key
if re.match("^["+string.lowercase+"]+$",words[i]) and not word_count.has_key(words[i]):

#add to the dictionary and get the count from the list
word_count[words[i]] = words.count(words[i])

for w in word_count:
print w,":",word_count[w]

Thursday, August 31, 2006

Blogger Beta

Finally got into the beta, but where did the rest of the enteries go ? They are back

Friday, August 25, 2006

Time for another update .... dont know about what though ..... anyone able to switch over to the new blogger beta ?

Friday, June 16, 2006

A templating implementation for PHP that probably comes quite close to the one provided by struts :- Flexy http://pear.php.net/manual/en/package.html.html-template-flexy.php

Struts so far has been awesome

Tuesday, May 30, 2006

Lets see here

Well its kinda late for the highlights but here they are anyway:-

Michael awakens and finding himself in the most awkward position ever ( you have to hear the story from him for the full effect )

Awesome Career Fair

We all passed OS ( this one was too close )

PGH 547 is being remodelled ( and not the way we thought it would be, this one not so much of a highlist )

Completing the SE project 30 minutes before the demo

At the moment this is all that I remember , and good luck to everyone who will be starting their internship tomorrow.

Tuesday, May 23, 2006

I need to update , maybe highlights of the semester

Thursday, April 13, 2006

Google Calendar

So far it seems very promising :)

Edit: Now if there was only a way to sync it with my phone ....

Tuesday, April 04, 2006

Oldest Account

Just going through a list of accounts at places that I have ... my oldest one is my first email address that I created at hotmail.com .... I created that account 9 years ago !!!! I still use it but mainly as a junk mail collector

Whats your oldest account and do you still use it ?

OS

"In this a blow at the hardware level a realist"

I beat you to it abhi lol

Saturday, April 01, 2006

Day Light Savings is such a pain

Tuesday, March 14, 2006

Finally

Finally I completed the challenges on slyfx.com ..... today after Tom posted something about Java, i decided to have one more go at the final challenge, 20 minutes later I was done .... now hopefully the people on that site come back and write the new levels.

Sunday, March 12, 2006

Eclipse + PHP

If anyone is using Eclipse with the PHPeclipse plugin and you want to disable the at times frustating auto completing of quotes follow these steps:-

Windows -> Preferences -> PHPeclipse -> PHP, then select the Typing tab and uncheck the two options to enable closing of quotes

Wednesday, March 08, 2006

CodeIgniter

This PHP framework is probably one of the easiest frameworks to get your head around. It was released a couple of days ago and it has been real impressive. Though relatively new it has a lot of the standard features while offering new stuff like Image Manipulation, Email Class, Encryption, Benchmarking etc. The best part about it is the low learning curve. As part of an experiment I recoded the entire CougarCS library with it and it was quite a pleasant experience.

Replacing the library with this code is another issue, but it was done real quick

Have a go at it here ==> CodeIgniter

Monday, February 27, 2006

How people find this site

Here are some interesting keywords that people use while searching and then stumble on my blog:-

will kashif and i get into a big fight today? (Google) ==> this one had me laughing, is it you shey ?? lol j/k

"Kashif Deniro" (Google)

DirectShow Syllabus (AltaVista) ==> people still use AV ???

Thursday, February 23, 2006

Googlefasting

Chris Pirillo has been trying googlefasting, which is quite interesting since I have thought about and even tried in the past( and failed !!! ). My search engine of choice was Yahoo! ( no surprise there ) but it just didnt cut it. A feeling you always get is that maybe your missing out on something from the search results and then you end up going to google

Conclusion: You can stay away from their services like mail, maps, but when it comes to search it is very difficult to replace Google. Maybe if Yahoo improves on its mindset feature switching could be a little more easier.

Wednesday, February 22, 2006

CougarCS Career Fair

All the hard work paid off. It was a complete success !!!!

Shey where are the pics ??

Monday, February 06, 2006

was it just me or the superbowl ads this year were just terrible ?

Monday, January 23, 2006

Interesting Article

Claims college students are not ready for life


Twenty percent of U.S. college students graduating from 4-year colleges don't have the skills to handle tasks like estimating whether their car has enough gas, or calculating the total cost of ordering office supplies, a new study has found.

Thursday, January 19, 2006

No School Friday

Nothing like that feeling, for the rest have a nice day at school :)

Friday, January 06, 2006

More MSN 8.0 Invites

Its invites time again, I have 6 to spare, first five comments get them
I came back from Florida yesterday, here is one of many pics I took there :)

Saturday, December 31, 2005

Well im off to Florida today, should be back by Tuesday !!! And to everyone a Happy New Year

Tuesday, December 20, 2005

MSN Messenger 8.0 Invites

I have 4 of them, if any one wants them leave a comment

Update: All gone, as soon as I get more Ill post em here.

Thursday, December 15, 2005

So fresh, so clean clean

I just reformatted that machine removing all the junk that I have had to install for these classes :)

I have also switched from AVG to Avast because after some research I found that Avast has better detection rates and its real time scanning is quite powerful

btw long what did shon do ?

Monday, December 12, 2005

Its Over !!!

Finally this wacky semester is done with ..... wow, seemed like forever. Definitely some fun and weird times this semester like:

Hurricane Rita screwing up thing like nobody imagined.
15 ppl in one elevator going for the arch exam
the rent a coder cheating scandal
more than 12 hours worth of coding for the multimedia mid term !!
The architecture debacle ..... ( everyone who was in the class knows what Im talking about )

Anyone have other stories worth mentioning ?

Sunday, December 04, 2005

8 more days before the end of the semester ... cant wait !!!!

Wednesday, November 30, 2005

Bloglines Alternative

Another alternative for bloglines, http://onefeed.com/home.php

Monday, November 28, 2005

Can you ..

shut down your computer and not use it and the internet for 2 whole weeks ?

Friday, November 25, 2005

Bypass the automated customer service ---> http://paulenglish.com/ivr/ ......now thats awesome

Monday, November 21, 2005

New AT&T logo

or should I say at&t logo



Looks more like a creme savers to me now

Sunday, November 20, 2005

Sun Java Studio Creator

The demo sure is interesting, does have a resemblance to Visual Studio though !!

Friday, November 18, 2005

Hey its time to update your blogrolls , Abhi has started blogging as well !!!!

Friday, November 04, 2005

Monday, October 31, 2005

collapsable link list thanks to shey

Oh yeah, and black friday is around the corner

Wednesday, October 26, 2005

Cake is delicios !!! But it would be interesting to see what Zend can come up with ==> http://zend.com/collaboration/

I also have 2 more wordpress.com invites to giveaway, so you know what to do.

Saturday, October 15, 2005

Who will buy AOL ???? Microsoft, Google, Yahoo ,Comcast or I ;) ????

AOL up for sale

Tuesday, October 11, 2005

For the past couple of years I have been using Crimson Editor to do most of my php coding ( and it does a fine job), but recently I have felt the need for more features such as auto completion, intellisense etc........ What are some other ( preferably freeware) editors out there that other php coders prefer ?

Friday, October 07, 2005

Google Reader is terrible, its confusing to use, the UI is terrible. It took forever to load my blogs from the OPML file and the feed lists tend to disappear. This one from google has a lot of problems.

What a waste !!!!

Monday, September 26, 2005

Wordpress.com Invite

Most of us know about FREE blog hosting provided by wordpress.com . I was lucky enough to get an invite today . So far the interface is amazing and is really simple to use.

Now I also happen to have 1 invite to give away. The person to get is the one who leaves the best comment at to what they would do with their wordpress.com blog :)

UPDATE: I will be emailing the lucky winner the invite tomorrow.

Saturday, September 24, 2005

Post Rita pics , thankfully nothing major happened and right now we are having beautiful weather.











Finally some sunshine

Friday, September 16, 2005

Since PHP and Security have been in the limelight these past couple of days, here is an excellent little flash tutorial that gives you hands on experience with some common security lapses that can occur when coding.

Thursday, September 15, 2005

GNU Prolog is driving me nuts !!!! They need more tutorials

UPDATE: A good tutorial http://cui.unige.ch/DI/cours/1804/GNU%20Prolog%20manual.html

Monday, September 12, 2005

i need to post more

In other news I have moved all my pictures from textamerica to flickr.

Thursday, August 18, 2005

Although I have yet to have that trouble here, but it is nice to see blogger implement word verification for comments. I have had this problem at my f2o site , but have curbed it with comment moderation.

Lets see what other features are going to be packed in.

Monday, August 15, 2005

Wow, some radical changes are being proposed for PHP 6.0, some of which are

Remove register_globals completely
Remove magic_quotes_*
Remove safe_mode
Remove some stuff that has been marked deprecated since PHP 3/4
Remove various function aliases

One thing is for sure, this means people will have to change their code radically in order for it to work on php 6.0 .....

Should be interesting to see how things shape up

http://shiflett.org/archive/135

Friday, August 05, 2005

I just finished redesigning my f2o site and one the "new" things that I wanted to add was AJAX. Since for my site the only place that it seemed obvious was the forms . After some searching here is a nice tutorial that shows you how to mix php and ajax and use it to validate forms: http://particletree.com/features/smart-validation-with-ajax

Monday, July 25, 2005

I am definitely impressed with MSN maps on first use.

First thing that comes across is the load speed, it definitely kicks google out of the water, even though im pretty sure their servers must be loaded since they just launched. Another aspect that stands out is the smooth scrolling, another +1 for virtual earth.

They have also included some features such as "locate me":- ( cant say much since both google and microsoft cant find my house and simply give me the map of houston ), "scratch pad":- which remembers all the places you searched for and also keeps track of where you last left off using cookies.

MSN maps is brilliant, though I dont see myself completely switching to either service I will surely be using them both side by side while comparing the results.

Sunday, July 24, 2005

As most of us know msn's virtual earth will be releasing tomorrow. Thanks to the google cache you can have a look at the web page here

Saturday, July 23, 2005

After coding in C and C++ for such a long time , it really takes some effort to keep in mind that there is a quite a big difference as how strings are evaluated in languages such as PHP or javascript when enclosed in double quotes as compared to single quotes. Proper use can definitely help in performance wise.

I think its safe to say the general rule of thumb when it comes to deciding when to use what is use single quotes when outputting plain strings and html with no variables since the PHP parser wont have to look for variable, and use double quotes when there are variables, special characters, symbols .

Here is a nice PHP benchmarking site http://www.blueshoes.org/phpBench.php

Monday, July 18, 2005

Something that would be cool is to have the complete map of the USA ( google map) with major highway intersection cams. Basically all the cams on one map.

Thursday, July 14, 2005

I so hope they dont screw up the transformers like how they do with everything else

Friday, July 08, 2005

With the Google Maps API release, I definitely wanted to play around with it and come up with something fun. First thing that came to mind was to show the various highway cameras on the maps and in those small boxes show a screenshot of the current conditions. I now present to you Houston Traffican Cams powered by the Google Maps API which can be found here http://kashif.f2o.org/gHoustonTraffic.html . The maps shows about 10 popular intersections with little markers. Click on the little markers to show a little camera shot .

These are the intersections that it is currently showing ( If you would like to see more, leave me a comment :) ):-

I-10 at Heights.

I-10 at TC Jester.

I-610 West Loop at Bellaire Blvd.

I-610 West Loop at Beechnut

I-45 at Cross Timbers.

I-45 at Tidwell .

I-45 at Little York.

59 at Hillcroft.

59 at Weslayan.

59 at Shepherd

59 at Beechnut.

Please let me know if there are any improvement that I can make to it. If there are other intersections that you would like to see you can visit the Houston Transtar and drop me a line at kashif-khan at excite dot com.

Saturday, July 02, 2005

Excellent little tip to use your gmail account as an organizer

http://www.tipmonkies.com/2005/05/12/use-gmail-as-a-personal-organizer/
After a simple little test, seems like yahoo maps have the most up to date information. They were able to locate my place while the other services like google, a9 didnt even know that it existed. +1 Yahoo