|
That looks more like three shakes of a lamb's tail.
|
|
|
|
|
It seems there's a difference between
Factor *= 10*(256-b(3))
and
Factor *= 10^(256-b(3))
I wish I could blame this snafu on someone else, but I can't.
|
|
|
|
|
Oops!
All of the books in the world contain no more information than is broadcast as video in a single large American city in a single year. Not all bits have equal value.
Carl Sagan
|
|
|
|
|
|
Watch out, in some languages the ^ operator is XOR, instead of exponentiation - you still might not have it right!
|
|
|
|
|
I'd like to call a hall of shame on myself - or, rather, my coding practices of about six years ago.
Having just jumped into .NET, I was building a periodic table. I (manually) serialized the element data in a double-separated string (I think the separators were | for elements and ; for each of their attributes).
The only problem was, I'd never heard of String.Split. I'd implemented a one-separator splitter once before using String.Substring, but the two-separator splitter was far more complex.
About six hours of coding later, I had around thirty lines of String.Substring (if I still had the files, I would paste in the function). It worked, but looking back, I realize I could have replaced all that with a single line.
Live and learn, I suppose.
|
|
|
|
|
That happens to everyone. When I started with WinForms the first thing I did was write a nice class for linked lists. And then had my facepalm moment when I discovered the the System.Collections namespace
To my defense: I used to work with C++ before and was used to be on my own for such things. Still, the class did its job and was a nice exercise to get used to managed references and garbage collection. And it gave me some impression about what kind of performance to expect from managed code.
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
Heh, yep it does happen to everyone. In my first ASP.NET projects (quite a few years back), I used a lot of string concatenations (in for loops) and data binding to literals. After a couple of projects, though, I was introduced to (a) repeaters and (b) StringBuilders, and thought that they were the best thing since sliced bread (coming from a mostly PHP background, you can get how I felt when I was showed these aspects of the framework).
Nowadays, I don't even dare to reopen those projects (and luckily most of them are already dead).
Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων!
(Alas! We're devoured by lamb-guised wolves!)
|
|
|
|
|
A lot of folk come to C# from some other language and they "already know how to program" so they don't look for how a task should be done. When starting with C# it is helpful to research how a task can be done with .NET rather than doing it the old C, C++ or Java way.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
I would say that being able to solve problems on their own demonstrated very well that they indeed do know how to program and their results document the range of their knowledge. If I had a choice between an experienced programmer who never has seen the .Net framework and another one who has memorized the MSDN and all 'best practices', but then is helpless when something outside his beaten path happens, then I sure know which one I will hire.
Frameworks and 'best practices' are nice and well. They can save you much time. They also mean that you have left the thinking to others. You have not invested much thought in the problem. You have not run into problems. You have not analyzed and solved the problem. And you have not gained much experience. From the perspective of bosses and money counters a cheap, well trained code monkey that gets the job done with a bit of luck and some prayers of course is the better deal.
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
If only I can use a DE with a serious autocompletion, then if I don't know an API yet, I press a ". " (dot) and examine all methods to find out if there is a ready to use solution for my problem. By the way I learn API, and after n times doing this operation, I catch up what is where. If there isn't, I use google. If I'm sure that there isn't any ready to use solution, I implement it. If I hit a brick wall, THEN I ask. I simply don't get why people using VS still ask for things like "how to convert an integer to a string" (or vice versa).
Greetings - Jacek
|
|
|
|
|
On the one hand, it's good to continually look for ways to code elegantly in the place you find yourself. On the other hand, there's no shame in keeping it simple and programming in a way that is mutually recognizable across a number of languages. If the language-neutral version is hard to understand and you learn a better way in the language, just refactor it. Changing to something simpler and smaller is generally safer than the long slow trudge in the other direction that any code base tends to make over the years.
I never saw much point in someone saying "I'm a C# developer" or "I'm a Java developer" or "I'm a C++ developer", like a single platform was a career or something. A successful career will outlive anything specific we know. The real deal is in a deep understanding of the patterns of design and usage that apply across platforms and being curious enough to learn what you would use to express them on several common ones and at least one emerging one.
|
|
|
|
|
It's very harsh to hall-of-shame yourself for that, when you're first interacting with a new environment you can't possibly know everything the framework does for you. I'm sure I manually split before I found that function too.
|
|
|
|
|
Nearly Every time I open up a previous project I also enter myself into the Hall of Shame. It is natural, especially now days as the complications and convulsions are enormous.
Today I opened up a project that is many years old and found an Access Database named tempory. It was supposed to be temporary. I could have claimed that it was a play on the Japanese word for fried battered vegetable and meat treats called tempura.
It was for temporary issues of credentials, so a bit of a stretch.
Spelling has often caused me embarrassment.
Then again it is my right to call any DB or Table what ever I want to.
And quite frankly the end user never sees this any way.
We all learn and each project elevates us somewhat more out of the HOS.
Then they invent a new Language and a new framework and we all have to re-learn all the stuff that we know backwards and dream about.
It is an endless battle.
But we all love it.
|
|
|
|
|
Some misspellings are intentional and carried on like some kind of traditiuon. I always write 'Admon' instead of 'Admin'. In my project folder there even is a project with the name 'AdmonWebService'
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
Last week we came across a serious security flaw in our soon to be released major web product that we had trusted the offshore partner (one the largest Indian IT firms) with. This happened despite clear guidance as to how to implement the security in the product which uses Silverlight and ASP.NET. They completely disregarded what was told and came up with a weird crazy arse lame mechanism of their own which led to the password being sent in a cookie merely as an ASCII valued string along with the login request!!! This is a cardinal sin, this is something you study in Web Security 101, totally unacceptable. Now, we can't just lay them off and bring all the work back onshore, the business financials don't probably allow for it. But it leads me to wonder whether outsourcing at all is worth the money spent or not? I know some of you may say, "you get what you pay for!!" but when a company boasts claims of excellence in delivery of solutions, I would atleast expect them to understand what web security is and what's the right way to do it. In my opinion all these cheap outsourcing companies are just that - CHEAP both in terms of money and quality. I m pretty sure many around here must have similar stories to tell.
|
|
|
|
|
gladiatron wrote: a company boasts claims of excellence in delivery of solutions
I suspect they'll tell you whatever you want to hear.
|
|
|
|
|
if a company has web development in their portfolio, you would expect them to take care of security at a professional level not at a school-boy level. heck! even school students know that ASCII converting the password string is just STUPID!
|
|
|
|
|
gladiatron wrote: ASCII
Do you mean base64?
|
|
|
|
|
Was gonna qote the same thing saying:
Just like when a site advertizes something is
FREE (< font size 500) * (< font size 1px)
|
|
|
|
|
May be you misread their slogan:
We do best according to your payment
|
|
|
|
|
we pay them to deliver a web product security of which is an integral part. It shouldn't even need stressing on, if they have a better idea then communicate not silently go in and do crappy work!
|
|
|
|
|
I have seen some students while I was in university, they used to do out-source through other companies.
The problem is, those university student has very little idea about security, because they know how to do javascript and html and other programming language, but security is more related with experience. The experience is not only gathered from year of working experience also working with the people who knows about it.
When you outsource your work you give it to some company in some country but you don't look at their setup. You really don't know how much they care about your security.
I am not telling you to do out-source. I am telling you to rethink how you would give your precious system to be developed by some company you barely know.
|
|
|
|
|
gladiatron wrote: must have similar stories to tell
Oooohhhhhhh yeah.... I know exactly what you are talking about.
Our "partner" was once tasked with building a very simple dialog based application consisting of a listbox and a couple of radio buttons. The app simply had to list files in a directory and write to a text file. They tried to tell us back here that it would take them a full month to write this application. A week just to do the UI! After 4 days of telling them that they are wrong, I wrote the entire thing in 2 days.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
I guess you had a very bad experience of Mis-management.That sort utilities could not take that much longer time.Either the guys are trying to mint you or the team is lazy
Sastry
|
|
|
|