It is surprising to me. Probably not for all Python programmers.
In [1]: a = 5 In [2]: b = 2 In [3]: a/b Out[3]: 2 In [4]: float(a)/float(b) Out[4]: 2.5
And another one, in same line:
In [5]: a = float(5) In [6]: b = float(2) In [7]: a/b Out[7]: 2.5
- Location:office
- Mood:
calm
Here is my personal opinion about how I see investments, especially the equity investments, be it in shares or mutual funds. I have been serious about investments in last 2 years, or I should say I started to invest/save money. This blog is completely based on the experience I acquired till date. If you are starting your investments afresh and looking out for opinion, please do not follow this advice, unless the objective is same. You may want to start small to take time to learn and make mistakes. Once you gain confidence, you may take a big leap.
Spot the HypeOne thing I see common among investors is amount of knowledge they gain before they begin investing. They believe that they do the complete study and make perfect choices. They give most importance to TV channels and newspapers. They go along with rest of crowd, be it adding new shares to the portfolio, or be it investing lump sum amount. They keep chasing the investments, believing that they are doing the right job, especially those who are looking for short-term gains. They feel bad when they loose money and they are too quick to react when the market conditions are not favourable.
Their primary concern is to get started with what rest of world does, irrespective of their own objectives. They do not set their objectives clear before they begin investing. As an investor, you should be driven by your objectives, not by the market conditions. Understand your requirement, what you want to achieve with this investment, in how many years. Manage separate portfolio for each objective. You should tune your investments accordingly.
Recruit a good Financial Advisor
It may sound as if it is not a good advice. According to me more than 90% of investors do not have a professional financial advisor. They should save most of your investment, provided you pay them their due. In India, we call them Agents or Brokers. It works out on a commission basis. We think that it is not worth to pay him the commission. We do not understand the worthiness of a personal financial advisor, hence we see them cheap. If you can spot a smart consultant, with whom you can setup a different deal than the one of commission basis, I am sure it will be a fruitful experience for both parties. They may provide insights about the trend and suggest a investment plan specially customized to meet your objective.
Another important aspect about recruiting a consultant is Time. I believe most of investors do not spend quality time with any Financial expert, be it a self, before taking a decision. They are mostly driven by what they see, hear and what they read from media and Internet. You may do the best analysis, but it may not be sufficient.
Still not convinced? OK. Let me attempt to illustrate better. Let us assume you are a Software Programmer and you are also a good cricket player who play cricket during the week end. You can not play the game continuously for 8 hours. Whereas the professional cricket player may play the game continuously for 8 hours or even more. You may spend time in front of computer writing software program continuously for 8 hours. Whereas a guy from different profession may not. The professional financial advisors are meant to provide quality advice, because they are professionals. Let us make use of their intelligence and knowledge.
Be systematic and consistent
I am not talking about lump sump investment. For the amount of money you are going to invest, it is not going to be a big deal of loss or profit when we compare it with the market condition. If your objective is to reap the benefits after say 5 years, continue investing systematically. At no cost you should break the investment unless your objective is met. Do not get carried away with the hype that is created around you. You can enjoy reading the articles, such as this one and move on attaining your objective.
- Location:home
- Mood:
cheerful
Using client certificate with Apache and Subversion
This is not a typical use case for anyone who use client certificate with Apache and Subversion. The use case is to use client certificate for all Apache requests, but not for Subversion requests. This sounds like a straightforward configuration in Apache configuration file, but it is not.
Usual workaround
The SSLVerifyClient optional directive is used to enforce client certificate based authentication. If it is specified at the <Location /> directive, all non-Subversion requests goes through client certificate based authentication. The SSLVerifyClient none directive is used to avoid using client certificate based authentication. If it is specified at the <Location /svn> directive, the Subversion requests does not go through this authentication.
413 -- Rquest Entity Too Large
If we use the above workaround, we face 413 HTTP error while uploading large files using POST method. It is due to bug 12355. According to this bug report, if SSLVerifyClient optional directive is specified at <Location /> directive, the user will face this issue. The bug report claims that it is fixed in Apache 2.0.55, but I faced this issue even in Apache 2.2.11.
The work around is to specify SSLVerifyClient optional at the virtual host level. But then, this setting can be overridden only using <Directory> directive. In our case, it can not be overridden using <Location /svn> directive. Thus the client certificate based authentication is enforced even for SVN requests.
SSLRenegBufferSize directive in Apache 2.2.12
The issue 413 Request Entity Too Large error is occurred when the SSL Renogtiation is attempted, because we specified SSLVerifyClient optional at <Location /> directive. The default size is 2048 bytes, which is not sufficient. In Apache 2.2.12, SSLRenegBufferSize directive is introduced precisely to configure the buffer size. I have not tried this in Apache 2.2.12 yet.
Snippet from Apache 2.2.12 changelog file.
*) mod_ssl: Add SSLRenegBufferSize directive to allow changing the
size of the buffer used for the request-body where necessary
during a per-dir renegotiation. PR 39243. [Joe Orton]
The Hack to overcome this issue
We can not use SSLVerifyClient optional at virtual host level. We also can not let SVN requests go through client certificate based authentication.
We skipped the client based authentication for specific servlets which supports file upload, as far as Apache is concerned. We modified the code to still authenticate using client certificate only for these servlets. By using the following directive we fixed this issue. We also avoid specifying the SSLVerifyClient optional directive at <Location /> directive.
This is not a typical use case for anyone who use client certificate with Apache and Subversion. The use case is to use client certificate for all Apache requests, but not for Subversion requests. This sounds like a straightforward configuration in Apache configuration file, but it is not.
Usual workaround
The SSLVerifyClient optional directive is used to enforce client certificate based authentication. If it is specified at the <Location /> directive, all non-Subversion requests goes through client certificate based authentication. The SSLVerifyClient none directive is used to avoid using client certificate based authentication. If it is specified at the <Location /svn> directive, the Subversion requests does not go through this authentication.
413 -- Rquest Entity Too Large
If we use the above workaround, we face 413 HTTP error while uploading large files using POST method. It is due to bug 12355. According to this bug report, if SSLVerifyClient optional directive is specified at <Location /> directive, the user will face this issue. The bug report claims that it is fixed in Apache 2.0.55, but I faced this issue even in Apache 2.2.11.
The work around is to specify SSLVerifyClient optional at the virtual host level. But then, this setting can be overridden only using <Directory> directive. In our case, it can not be overridden using <Location /svn> directive. Thus the client certificate based authentication is enforced even for SVN requests.
SSLRenegBufferSize directive in Apache 2.2.12
The issue 413 Request Entity Too Large error is occurred when the SSL Renogtiation is attempted, because we specified SSLVerifyClient optional at <Location /> directive. The default size is 2048 bytes, which is not sufficient. In Apache 2.2.12, SSLRenegBufferSize directive is introduced precisely to configure the buffer size. I have not tried this in Apache 2.2.12 yet.
Snippet from Apache 2.2.12 changelog file.
*) mod_ssl: Add SSLRenegBufferSize directive to allow changing the
size of the buffer used for the request-body where necessary
during a per-dir renegotiation. PR 39243. [Joe Orton]
The Hack to overcome this issue
We can not use SSLVerifyClient optional at virtual host level. We also can not let SVN requests go through client certificate based authentication.
We skipped the client based authentication for specific servlets which supports file upload, as far as Apache is concerned. We modified the code to still authenticate using client certificate only for these servlets. By using the following directive we fixed this issue. We also avoid specifying the SSLVerifyClient optional directive at <Location /> directive.
<LocationMatch "^/servlets/(?!(fileUpload1|fileUpload2) )">
SSLVerifyClient optional
SSLVerifyDepth 2
</LocationMatch>
SSLVerifyDepth 2
</LocationMatch>
This is not a perfect solution, but it solves the problem on hand. We should upgrade to Apache 2.2.12 and verify if SSLRenegBufferSize directive fixes our problem.
- Location:home
- Mood:
creative
I have been using Twitter for over 3 months. I notice there is a over-hype with the way people use this website. The users are excited about the power of leading and sharing information with others. It is fun if you are interested to know what your friends, colleagues and mentors do. It is also fun to share useful information with same set of people and/or your followers. I like to know what my friends or colleagues do, even if it is not useful to me. However, I will be not interested to know what my followers do, even if I do not know them personally, it is immaterial to me.
Thousands of followers
I have seen people following thousands of people and also being followed by thousands of people. I'm quite sure it is not useful for either of them, except for the wastage of resource and data storage. For instance, if i am following 100 tweets, first I must have time to view all those tweets everyday. If my only job is to do it, it will be fun. Otherwise, I see it as useless and not feasible to do on a regular basis.Advertisement campaign
Most of the tweets are targeted towards Advertisement. It is another form to gain the surfers attention. It is hyped and over a period of time, they may find another medium to advertise their product. I have heard success stories on customer support, like Dell, Ford, Baby products. These are all very good at one end, overall I see more spam than genuine tweets while I follow many tweets.Information Redundancy
This is another issue I face with twitter when I follow numerous people. For instance, I follow less than 20 tweets. With this small tweet network, I got the news about Michael Jackson's Death through 5 tweets (25%). Imagine if I am following 100 tweets. I am sure I would have received this news at least through 25 tweets!These are the aspects I feel bad about Twitter. There are so many other good things about using Twitter. I will post about them once I use this website for few more weeks.
- Location:office
- Mood:
creative
One of our customer reported a funny issue with the pre-lock.bat hook script. Yes, when he use Subversion Server on Windows system. The customer is using a custom pre-lock.bat script to explicitly lock the file before every commit. Why does he explicitly lock the file while svn commit itself locks the file implicitly? He has a valid reason to do so.
In earlier releases (>v1.6), Subversion discarded the stdout messages printed in hook scripts. It is applicable for all hook scripts including pre-lock.bat script. Starting v1.6, it behaves same with all hook scripts, except pre-lock.bat script. The message printed in this hook script is used as a UID for the lock. It should be unique across the repository. The best part about Subversion is, it is clearly documented in the Subversion 1.6 Release Notes.
Guess what? The customer complained that the custom pre-lock.bat script worked very well in prior releases, but it do not work with Subversion 1.6. When he commit the file, he face 423 Locked Error error. When we investigated if it is got to do with any stdout messages, NO. The hook script does not print any message to stdout.
WHERE DO THE PROBLEM EXISTS?
The issue is, the customer has set echo on globally in his Windows system. It prints all the commands we execute in the hook script to stdout, including the comments as in rem command. The solution is to set echo off in his system, and he no more faces the problem!
In earlier releases (>v1.6), Subversion discarded the stdout messages printed in hook scripts. It is applicable for all hook scripts including pre-lock.bat script. Starting v1.6, it behaves same with all hook scripts, except pre-lock.bat script. The message printed in this hook script is used as a UID for the lock. It should be unique across the repository. The best part about Subversion is, it is clearly documented in the Subversion 1.6 Release Notes.
Guess what? The customer complained that the custom pre-lock.bat script worked very well in prior releases, but it do not work with Subversion 1.6. When he commit the file, he face 423 Locked Error error. When we investigated if it is got to do with any stdout messages, NO. The hook script does not print any message to stdout.
WHERE DO THE PROBLEM EXISTS?
The issue is, the customer has set echo on globally in his Windows system. It prints all the commands we execute in the hook script to stdout, including the comments as in rem command. The solution is to set echo off in his system, and he no more faces the problem!
- Location:home
- Mood:
cheerful
- 11:57 These days I use pkill command very often to terminate firefox and evolution applications.
- 12:00 With friends available for company, the monthly trip to Thiruvannamalai for Girivalam becomes a habit! Lord Shiva "keep the company going"!
- 18:53 I enjoy watching World T20 matches in ESPN and STAR SPORTS. Thank God, SONY MAX is not broadcasting the matches this time!
If you follow my blog, but dislike me updating my tweets to blog, please comment. I'll stop updating tweets to LJ if I get >5 votes against the updates.
- Location:home
- Mood:
cheerful
- 12:54 ICICI Bank takes *exactly* 4 days to clear a local cheque. They do not seem to honour RBI instruction to clear local cheques in 1 day.
- 18:33 Chennai Telephones maintain changed numbers for more than 3 years. We can query for a phone number, by providing the old phone number.
- 18:45 Ubuntu is the only FOSS project I knew that never slip dates. They consistently ship 2 releases every year: Apr(04) and Oct(10)! Agile?!?
- 19:11 The bing.com is older than google.com by an year. The domain was registered in year 1996. Was Microsoft developing Bing for 13 years? Wow!
- 09:58 It took only 90 minutes to travel chrompet->mylapore->tnagar->ashok nagar->guindy from 8.00am to 9.30am. Chennai traffic is not bad!
- 20:47 Subscribed ESPN and STAR CRICKET channels to view ICC T20 matches. Proud to use TATA SKY, as everything is done online instantaneously.
- 12:28 I do not like to retain emails without a Subject in Inbox. If it is important, I forward it again to me with valid subject.
- 12:23 Back from a week end trip to Madurai in TATA SUMO with friends. Noticed atleast 1 accident for every 50kms
- 12:25 The drive during night Madurai -> Chennai is thrilling, as there are no proper sign boards where the road is being laid Trichy -> Madurai
- 16:58 Saw this Tamil film Karuthamma (relesed in 90s) recently. Film carries a message on killing Baby Girls. Nice one from Bharathi Raja.
- 17:02 I feel ashamed to see 8 Cabinet/MOS ministers from my state. I do not think it make any difference to the state, except having a low profile
- 18:53 95% -- It is my activity score in the matrimony site!
- 17:46 These days I'm not following up with Livejournal friends & Orkut friends possibly because I've many other interesting stuff to look into.
- 21:06 The IGNOU student support site stusupport.ignou.ac.in is down for past 1 week. Bad System Admins. Bad for Students like me!
- 20:22 If you are fed-up with your work, take a break, say 1 week. Believe me, it pays off. You will be at your best when you return to work.
- 20:24 Learned lot of JS tricks mostly related to editing the html page dynamically. I can not believe I stayed away for JS these many years
- 08:55 I sense a pattern in this IPL tournament with the way DC and RCB team is playing. If my prediction is right, DC team will win the cup.
- 08:56 I'm completely impressed by the way RCB have bounced back in this tournament. All credit goes to the legend, Anil Kumble.
- 19:56 Enjoyed the day meeting one of my best friend after 2 years. It was completely relaxing and refreshing. Looking forward for the week ahead
- 18:30 These days, I do not have a friend with whom I can talk meaninglessly more than 10minutes over phone
- 18:19 Glad to see DMDK candidates have got more than 1lakh votes in 9 constituencies. They are one of reason for this result in Tamil Nadu
- 18:20 It will take atleast a decade to recover from this defeat for PMK party. Till then, I think DMDK will fill the gap for the alliance
- 18:35 In last 6years, I have not received even 1 cold call to my mobile number using my website. Telemarketers may love such a script/software!
- 18:45 After 6 months I have set my ringback tone. Set it to "Vizhi Moodi" song from tamil film, Ayan -- tr.im/lEth
- 21:35 @brianbehlendorf looking the nested items something like this? bit.ly/fetZl
