Oldbridge Gourmet Deli on 373 Lexington Ave at E 41st St (very close to the Grand Central Terminal & the Grand Hyatt of NY) has a great dollar deal for breakfast.
Update: This deal is dead as the price is now $1.75 - still not bad ...
In the morning till about 10.30 am, they have a buttered bagel and a small coffee for only a Dollar !
The good part is that you can choose from a variety of bagels and flavored coffees instead of the regular ones for the same price. I saw exotic coffee flavors like Banana Cream, Chocolate Raspberry, French Vanilla, etc.
And just because the prices are so low, it doesn't mean that they skimp on the quality. The bagels are of very good quality and had a proper amount of butter. The coffees are very good too and the best part is that you make your own coffee according to your taste. So you can as well mix multiple flavors and add the amount & type of sugar & milk to suit your specific taste.
You can take out if in a hurry, but if you have time, then you eat it in the spacious dining area on the second floor - so no skimping there either!
Two thumbs up to this place for providing such a good quality breakfast for so cheap.
Update: The deli was closed for some time and now has reopened under a new management who have stopped the great deal.
This deal is now dead as the price is now $1.75 - which is still not bad. They now also have an option for a large coffee instead of a small one for $2.25. However, the options for flavored coffees are lesser compared to before, but still present!
Tuesday, September 29, 2009
Friday, September 25, 2009
Convert Fixed width file to Delimited in Unix
Needed to convert a Convert Fixed width file to Delimited recently. There are many solutions, but the simplest & best solutions involved using the tools available in Unix / Linux. Here are a few possible ways to do it on Unix / Linux.
Input File: fixed.txt
The column widths are 2, 4, 6 & 3
Output File: delim.csv
Using GAWK on Linux
This solution defines field widths & field separator and then uses gawk to split each line. The only down side is that GAWK is available only on Linux or GNU based systems.
Using SED on *nix
This solution uses sed - a stream editor to substitute commas inline.
The -e is to tell sed to execute the next command line argument as a sed program and you can have multiple such commands.
The s/./ looks to substitute any character.
The &, denotes the matched string followed by a comma that we need.
The /2 tells sed to do this substitution for only the first 2 such occurrences.
So in effect, a comma is put in after the first 2 characters are matched. Note that since this is substituting inline, the insertion point for the next comma is at position 2 + 1 + 4 = 7!
Here is a link to a very good list of handy sed one-liners on linuxhowtos.org.
Using AWK on Unix
1. Create a file conversion_rules
2. Run the command:
This solution uses plain awk to loop through each line and add comma after the defined column length. An awk program file is created to define the column lengths and the looping & comma insertion logic. This is fed to an awk instance along with the input file and the output is redirected to the required file.
Input File: fixed.txt
The column widths are 2, 4, 6 & 3
AABBBBCCCCCCDDD EEFFFFGGGGGGHHH IIJJJJKKKKKKLLL MMNNNNOOOOOOPPP QQRRRRSSSSSSTTT UUVVVVWWWWWWXXX YYZZZZAAAAAABBB
Output File: delim.csv
AA,BBBB,CCCCCC,DDD EE,FFFF,GGGGGG,HHH II,JJJJ,KKKKKK,LLL MM,NNNN,OOOOOO,PPP QQ,RRRR,SSSSSS,TTT UU,VVVV,WWWWWW,XXX YY,ZZZZ,AAAAAA,BBB
Using GAWK on Linux
gawk < fixed.txt 'BEGIN{ FIELDWIDTHS = "2 4 6 3"; OFS=",";}{print $1,$2,$3,$4}' > delim.csv
This solution defines field widths & field separator and then uses gawk to split each line. The only down side is that GAWK is available only on Linux or GNU based systems.
Using SED on *nix
sed -e 's/./&,/2' -e 's/./&,/7' -e 's/./&,/14' fixed.txt > delim.csv
This solution uses sed - a stream editor to substitute commas inline.
The -e is to tell sed to execute the next command line argument as a sed program and you can have multiple such commands.
The s/./ looks to substitute any character.
The &, denotes the matched string followed by a comma that we need.
The /2 tells sed to do this substitution for only the first 2 such occurrences.
So in effect, a comma is put in after the first 2 characters are matched. Note that since this is substituting inline, the insertion point for the next comma is at position 2 + 1 + 4 = 7!
Here is a link to a very good list of handy sed one-liners on linuxhowtos.org.
Using AWK on Unix
1. Create a file conversion_rules
{
a[1] = 2;
a[2] = 4;
a[3] = 6;
a[4] = 3;
}
{
o = "";
r = 1;
for (i=1;i<length(a);i++)
{ o = o substr($0,r,a[i]) ","; r = r + a[i]; }
o = o substr($0,r,a[length(a)])
print o;
}
2. Run the command:
awk -f conversion_rules fixed.txt > delim.csv
This solution uses plain awk to loop through each line and add comma after the defined column length. An awk program file is created to define the column lengths and the looping & comma insertion logic. This is fed to an awk instance along with the input file and the output is redirected to the required file.
Tuesday, September 22, 2009
NY Hop-On Hop-Off Tour 15% Discount at GrayLine
A great way to see New York is by taking the famous Hop-On Hop-Off Tour. And if you can get a good discount on the ticket prices, that is like icing on the cake!
New York Gray Line Hop-On Hop-Off Tours has an automatic 15% discount off most (most probably ALL) of their tours - I did not see this advertised anywhere. I checked all their Best Value Tours and all the tours listed on their home page and the discount is automatically applied to these tours.
This is a very good value for money and it is 15% off of their already reduced prices if you buy online.
Personally I have taken their tours twice in as many years and have thoroughly enjoyed it always. I prefer to take their Best Value All Loops Tour (48 hours) which includes 4 separate double decker tour loops that allow you to enjoy the best of Manhattan and Brooklyn with 48 HOURS of unlimited hop-on, hop-off opportunities at over 50 stops! The best part is that the tickets are valid for 48 hours by the clock.
Thanks to my friend Dipankar for pointing out this great deal!
New York Gray Line Hop-On Hop-Off Tours has an automatic 15% discount off most (most probably ALL) of their tours - I did not see this advertised anywhere. I checked all their Best Value Tours and all the tours listed on their home page and the discount is automatically applied to these tours.
This is a very good value for money and it is 15% off of their already reduced prices if you buy online.
Personally I have taken their tours twice in as many years and have thoroughly enjoyed it always. I prefer to take their Best Value All Loops Tour (48 hours) which includes 4 separate double decker tour loops that allow you to enjoy the best of Manhattan and Brooklyn with 48 HOURS of unlimited hop-on, hop-off opportunities at over 50 stops! The best part is that the tickets are valid for 48 hours by the clock.
Thanks to my friend Dipankar for pointing out this great deal!
Thursday, September 17, 2009
Walkthrough of Market Caps during Crisis
NYTimes came up with a very interesting & unique way to show how the Finance giants fared in terms of Market Cap during the financial crisis. The auto-running chart shows the market caps of the 29 biggest financial firms starting from October 2007 when the market was at it's peak, and moving up to Sept 11, 2009.
It points out a very interesting fact:
JPMorgan Chase and Wells Fargo are the only two firms to be slightly bigger than what they were during the market's peak in October 2007!
Check out this unique chart on the NYTimes website here.
It points out a very interesting fact:
JPMorgan Chase and Wells Fargo are the only two firms to be slightly bigger than what they were during the market's peak in October 2007!
Check out this unique chart on the NYTimes website here.
New Risk Models for Wall Street
The race is on to make newer and better Quant models that factor in the human behavior and psychology.
The existing risk models factored in the default risk of counterparties and the financial instruments. They surely did not factor in the market hysteria / panic and the human behavioral aspect into the models. Generally at the time of such panic, the markets as people may be madly rushing in to sell off the stock or even just freeze and hold back on all transactions. This leads to the newly coined type of risk - "Liquidity Risk".
Financial Markets are being looked at as being similar to Online Communities or Social Networks in terms of a group or collective behavior. So the Risk models are being opened up to allow for more variables and factors affecting it. Researchers at Cornell, MIT, etc., are working on newer risk models using these ideas.
Read the full article on the NYTimes website here.
The existing risk models factored in the default risk of counterparties and the financial instruments. They surely did not factor in the market hysteria / panic and the human behavioral aspect into the models. Generally at the time of such panic, the markets as people may be madly rushing in to sell off the stock or even just freeze and hold back on all transactions. This leads to the newly coined type of risk - "Liquidity Risk".
Financial Markets are being looked at as being similar to Online Communities or Social Networks in terms of a group or collective behavior. So the Risk models are being opened up to allow for more variables and factors affecting it. Researchers at Cornell, MIT, etc., are working on newer risk models using these ideas.
Read the full article on the NYTimes website here.
Google FastFlip launched in labs
Google Labs has launched FastFlip - it's a very good concept.
In this web application, Google combines the good qualities from both Print & Net and provides the user with the ability to quickly "flip" through
online pages just like one would do with a newspaper or a magazine.
What Google does is that it takes images of the websites and shows it to the users in a magazine-like format where the users can scan through the articles and click to go to the actual website if they are interested in reading the full article. For more details on the exact methodology that Google uses to show the articles can be seen here.
In this web application, Google combines the good qualities from both Print & Net and provides the user with the ability to quickly "flip" through
online pages just like one would do with a newspaper or a magazine.
What Google does is that it takes images of the websites and shows it to the users in a magazine-like format where the users can scan through the articles and click to go to the actual website if they are interested in reading the full article. For more details on the exact methodology that Google uses to show the articles can be seen here.
Wednesday, September 16, 2009
The "Right" way to Code
In the days before Google, I had formulated the CTP theory which I proposed as the "Right" or better way to Code for Junior Developers. With the advent of Google, this theory transformed to the GCTP theory.
CTP:
Before Google came up, junior programmers often used to copy & reuse existing code which was written either by them or someone else they knew or they had somehow got hold of the relevant code.
This caused a lot of problem when I was managing a team of such developers, so I formulated the CTP Theory.
The first thing I did was to encourage them to use their imagination & creativity to solve the problem themselves. If required, they could look-up the code base that most of the consulting companies already have to gain insight into ways the problem could be solved, and then come up with their own solution.
However, if there was a time crunch and/or it was felt that reinventing the wheel provided no benefit, then CTP should be applied.
C : Copy - find & copy the portion of code / routine you want
T : Transform - transform/change the code to suit your needs - this step was missed most often
P : Paste - paste the changed code in the right place
If CTP was used diligently, it provided greater success to the project
GCTP:
However, with the arrival of Google, everyone started to just google the solution and so I had to come up with the next version of the theory which I named GCTP.
Again, the first thing I did was to encourage them to use their imagination & creativity to solve the problem themselves.
However, if there was a time crunch and/or it was felt that reinventing the wheel was of no benefit, then GCTP should be applied.
G : Google the problem - google the problem
C : Copy - find & copy the portion of code / routine you want from the google results
T : Transform - transform/change the code to suit your needs - this step was missed most often
P : Paste - paste the changed code in the right place
If GCTP is used diligently, it will provide greater success to the project and quicker coding maturity to the junior developers with the least amount of hand-holding/supervision.
Note that the emphasis on both these methods is first to try to use your own brain. But in case these need to be used, then the emphasis in on T - Transform as that is where I found the junior developers making most of the mistakes most probably because either they did not understand the real problem or the way the solution had been coded.
CTP:
Before Google came up, junior programmers often used to copy & reuse existing code which was written either by them or someone else they knew or they had somehow got hold of the relevant code.
This caused a lot of problem when I was managing a team of such developers, so I formulated the CTP Theory.
The first thing I did was to encourage them to use their imagination & creativity to solve the problem themselves. If required, they could look-up the code base that most of the consulting companies already have to gain insight into ways the problem could be solved, and then come up with their own solution.
However, if there was a time crunch and/or it was felt that reinventing the wheel provided no benefit, then CTP should be applied.
C : Copy - find & copy the portion of code / routine you want
T : Transform - transform/change the code to suit your needs - this step was missed most often
P : Paste - paste the changed code in the right place
If CTP was used diligently, it provided greater success to the project
GCTP:
However, with the arrival of Google, everyone started to just google the solution and so I had to come up with the next version of the theory which I named GCTP.
Again, the first thing I did was to encourage them to use their imagination & creativity to solve the problem themselves.
However, if there was a time crunch and/or it was felt that reinventing the wheel was of no benefit, then GCTP should be applied.
G : Google the problem - google the problem
C : Copy - find & copy the portion of code / routine you want from the google results
T : Transform - transform/change the code to suit your needs - this step was missed most often
P : Paste - paste the changed code in the right place
If GCTP is used diligently, it will provide greater success to the project and quicker coding maturity to the junior developers with the least amount of hand-holding/supervision.
Note that the emphasis on both these methods is first to try to use your own brain. But in case these need to be used, then the emphasis in on T - Transform as that is where I found the junior developers making most of the mistakes most probably because either they did not understand the real problem or the way the solution had been coded.
Another Economic Indicator for Modern Times
Inspired by the few interesting and totally different Economic Indicators for Modern Times that I found on the web, I propose one more: Public Transport Standees Indicator in two versions - one applicable for U.S. and another applicable for India.
More formally, I propose the Public Transport Standees Indicator as:
U.S. Version:
Public Transport Trains/Buses are more crowded and have more number of Standees when the economy is strong and going good.
If the economy is very weak and people are out of work, they don't commute and so the Buses/Trains are emptier and have less or no standees.
This is especially applicable for U.S. where the difference between the cost of public transport and driving personal vehicle is not so significant. Also note that this applies more to big cities like New York, Chicago, etc. where the public transport facilities are very good.
India Version:
Public Transport Trains/Buses are more crowded and have more number of Standees when the economy is weak and going poor as people try to save every possible penny.
If the economy is very strong and people have good paying jobs, they use personal transport and so public transport has less or no standees.
This is especially applicable for India where the difference between the cost of public transport and driving personal vehicle is significant and the people are very price conscious. Also note that this applies more to big cities like New Delhi, Mumbai, Kolkata etc. where the public transport facilities are very good.
So, India version is the exact opposite of the US version!
More formally, I propose the Public Transport Standees Indicator as:
U.S. Version:
Public Transport Trains/Buses are more crowded and have more number of Standees when the economy is strong and going good.
If the economy is very weak and people are out of work, they don't commute and so the Buses/Trains are emptier and have less or no standees.
This is especially applicable for U.S. where the difference between the cost of public transport and driving personal vehicle is not so significant. Also note that this applies more to big cities like New York, Chicago, etc. where the public transport facilities are very good.
India Version:
Public Transport Trains/Buses are more crowded and have more number of Standees when the economy is weak and going poor as people try to save every possible penny.
If the economy is very strong and people have good paying jobs, they use personal transport and so public transport has less or no standees.
This is especially applicable for India where the difference between the cost of public transport and driving personal vehicle is significant and the people are very price conscious. Also note that this applies more to big cities like New Delhi, Mumbai, Kolkata etc. where the public transport facilities are very good.
So, India version is the exact opposite of the US version!
Economic Indicators for Modern Times
Here are few (not so serious) Economic Indicators for Modern Times trawled from the web, more specifically from the great site for finance terms - Investopedia
Skirt Length Theory:
Skirt lenghts are predictors of stock market direction. If the skirts are short, the markets are going up and the general confidence is high. If the skirt lengths are bigger, markets are sad & gloomy and confidence is low.
Hot Waitress Economic Index:
Index to measure the state of the economy by measuring the number of attractive people working as waiters. If there are higher number of good looking waiters, then the economy is weak as attractive people generally do not have problems getting higher paying jobs in a good economy.
Leading Lipstick Indicator:
Indicator based on theory that in tough economic times, sales of less expensive indulgences like lipsticks shoots up. This chairman of Estee Lauder consistently noted that during difficult economic times, the sales of his lipsticks went up remarkably.
Aspirin Count Theory:
Market theory that stock prices and aspirin production are inversely related and is a lagging indicator that actually hasn't been formally tested. If the markets are good and prices are higher, fewer people will need to take pain/stress relievers like aspirin.
sports Illustrated Swimsuit Issue Indicator:
Indicator that provides insight on the stock market return for that year based on the nationality of the model on the cover of the Sports Illustrated Swimsuit Edition. The indicator suggests that when the cover model is from outside the U.S., S&P 500 underperforms that year. When the coer model is from U.S., S&P 500 will generate a better return that year.
Boston Snow Indicator:
Market theory that snow on Christmas in Boston will result in rising stock prices for the following year. Clearly there is no logical correlation between a white Christmas in Boston and the performance of the stock market the next year. Most probably that's why this indicator is also referred to as the "BS indicator" ;)
Skirt Length Theory:
Skirt lenghts are predictors of stock market direction. If the skirts are short, the markets are going up and the general confidence is high. If the skirt lengths are bigger, markets are sad & gloomy and confidence is low.
Hot Waitress Economic Index:
Index to measure the state of the economy by measuring the number of attractive people working as waiters. If there are higher number of good looking waiters, then the economy is weak as attractive people generally do not have problems getting higher paying jobs in a good economy.
Leading Lipstick Indicator:
Indicator based on theory that in tough economic times, sales of less expensive indulgences like lipsticks shoots up. This chairman of Estee Lauder consistently noted that during difficult economic times, the sales of his lipsticks went up remarkably.
Aspirin Count Theory:
Market theory that stock prices and aspirin production are inversely related and is a lagging indicator that actually hasn't been formally tested. If the markets are good and prices are higher, fewer people will need to take pain/stress relievers like aspirin.
sports Illustrated Swimsuit Issue Indicator:
Indicator that provides insight on the stock market return for that year based on the nationality of the model on the cover of the Sports Illustrated Swimsuit Edition. The indicator suggests that when the cover model is from outside the U.S., S&P 500 underperforms that year. When the coer model is from U.S., S&P 500 will generate a better return that year.
Boston Snow Indicator:
Market theory that snow on Christmas in Boston will result in rising stock prices for the following year. Clearly there is no logical correlation between a white Christmas in Boston and the performance of the stock market the next year. Most probably that's why this indicator is also referred to as the "BS indicator" ;)
Shadman $7 Lunch Buffet very good
Had been to Shadman Indian/Pakistani restaurant on Grove Street in Jersey City and here's the review.
Ambience: 5/10
Food: 8/10
Service: 7/10
Verdict: Go there for a cheap but very good Lunch Buffet.
Details:
The best part is that the All-You-Can-Eat Lunch Buffet costs only $7 and includes veg & non-veg items!
The Buffet menu had 4 veg curries, 4 non-veg curries, choice of Indian breads, salad, raita, chutney, one veg appetizer, fried peas pulao and a sweet.
Ambience & decor is pretty average & minimalistic - similar to that of Chandni, nothing very great to be specially written about.
Prices are very economical by NJ/NYC standards, especially given the proximity to Exchange Place - an all you can eat non-veg buffet cost only $7.
On that particular day, palak pakoras were served for appetizer - quite average and not very great. However the raita & the chutney were quite tasty and very good.
The buffet had four veg curries: Aloo Gobi, Aloo Palak, Beans, and Chhole without the usual layer of oil. The taste was quite good and the Chhole tasted much closer to the taste one would get in Delhi or most of Northern India. Note that this taste is quite different from that made in the remaining parts of the country.
I had Naan & Roti - both were excellent; very soft & fluffy - aboslutely delicious!
The fried peas pulao was very oily and not as good as expected. So was the kheer - not worthy of a mention.
So, next time when you are in Jersey City and feel the urge for an economical Desi Buffet, make Shadman your target!
Ambience: 5/10
Food: 8/10
Service: 7/10
Verdict: Go there for a cheap but very good Lunch Buffet.
Details:
The best part is that the All-You-Can-Eat Lunch Buffet costs only $7 and includes veg & non-veg items!
The Buffet menu had 4 veg curries, 4 non-veg curries, choice of Indian breads, salad, raita, chutney, one veg appetizer, fried peas pulao and a sweet.
Ambience & decor is pretty average & minimalistic - similar to that of Chandni, nothing very great to be specially written about.
Prices are very economical by NJ/NYC standards, especially given the proximity to Exchange Place - an all you can eat non-veg buffet cost only $7.
On that particular day, palak pakoras were served for appetizer - quite average and not very great. However the raita & the chutney were quite tasty and very good.
The buffet had four veg curries: Aloo Gobi, Aloo Palak, Beans, and Chhole without the usual layer of oil. The taste was quite good and the Chhole tasted much closer to the taste one would get in Delhi or most of Northern India. Note that this taste is quite different from that made in the remaining parts of the country.
I had Naan & Roti - both were excellent; very soft & fluffy - aboslutely delicious!
The fried peas pulao was very oily and not as good as expected. So was the kheer - not worthy of a mention.
So, next time when you are in Jersey City and feel the urge for an economical Desi Buffet, make Shadman your target!
Subscribe to:
Posts (Atom)
loading..