• Artemus Harper (unregistered) in reply to hunter9000

    Actually No, there is a hidden feature in Hashtable, in that when you grab something out of a Hashtable it uses the equals method on the existing key instead of the object you passed in. This leads to a more secure operation since you could encapsulate the hashtable with just a get and put method without worring about someone trying to steal hidden keys from the hashtable. HashMap uses equals on the key you pass in, which tends to be easier to optimize from the JIT point of view.

  • Andrew (unregistered)

    The again, you don't store 100s of 1000s items in memory. You use the file system, or perhaps something a little easier, a database.

    100,000 jpegs x 100kb/ea = 10,240,000,000

    10 Gigs means all you will do is swap. Better use the disk in a controled manner than let Windows swap memory.

  • AGould (unregistered) in reply to Ch0
    Ch0:
    Fiona:
    How... did... my god.. I don't understand what these people do to be landed in these jobs.

    That's the thing.

    How can an idiot get a job when I can't? Who do they apply to?

    But then, would I really want to work for the sort of person who'd happily employ an idiot alongside me?

    I was just having that thought myself.

    Although mine was "That's why I'm not a programmer - I'm overqualified."

  • (cs) in reply to Fiona
    Fiona:
    How... did... my god.. I don't understand what these people do to be landed in these jobs.
    Getting a job requires [sadly] nothing more than a good Interview.

    Doing] a job well requires skill, experience, tenacity, (good grammar and spelling?).

    I have a good job because I can spell tenacity and try to use it in a sentence quite often. <g>

  • Myself (unregistered)

    I showed this to my wife who uses C # to make her living. I am glad that she married well because otherwise she would obviously starve to death! The only thing that she pointed out was that the class member variables should not be public.

    I almost choked on my spit. I told her to take Algorithmization 101. Now I sleep on the couch. :(

    I would recommend changing James' job description from "C-sharp programmer" to "C-blunt writer". That would be, I think, appropriate.

    Poor Yakir.

    Myself

  • (cs) in reply to ParkinT
    ParkinT:
    Getting a job requires [sadly] nothing more than a good Interview.

    Doing] a job well requires skill, experience, tenacity, (good grammar and spelling?).

    I have a good job because I can spell tenacity and try to use it in a sentence quite often. <g>

    Good move, leaving out "punctuation".

  • Pdunc (unregistered) in reply to Devek

    Uh... VB anyone?

    CAPTCHA: Tesla - gawd awful band

  • mike (unregistered) in reply to Karl von L.
    Karl von L.:
    Derek:
    But seriously, where's the WTF in this? Looks fine to me.

    God, I hope you're joking. This so-called "hash table" doesn't even use any, um, hashing.

    sure it does, it's just that every item (implicitly) hashes to the same value.

  • Khanmots (unregistered) in reply to Ben Blok
    Ben Blok:
    Devek:
    I don't know C#.. but one of the things that has troubled me in the past about "high" level languages(like Java) is that it requires an immense amount of knowledge to be able to do anything correctly while attracting novice programmers left and right.

    Just normal C is easier to program in because you know what your C code is doing for the most part. Novice programmers should start there.

    To write good Java code you have to not only know what your code is doing, but how everything your code is doing is implemented.

    Perfect example of novices using a "high" level language when they don't know enough about coding is Gentoo's portage system. Python is the worst offender when it comes to luring in novices to do something they have no business doing.

    I do not really agree on this mainly because C has the huuge overhead of learning memory management. C makes shooting yourself in the foot really easy.

    Personally I think teaching programming using a language that requires people to understand what's going on is a good thing.

    When you've got people trying to learn, the less that's just "magic" the better. Anyone that's come out of a C course should know what an array really is... and how that impacts usage. Why? You've had to deal with it at a much lower level than you would in something like Java.

    When I was a supplemental instructor for one of the C courses at my uni, a large portion of my lecture time was devoted to helping people understand what was going on with memory and why that was important. I really doubt that'd have been the case if I'd been teaching a high level language like Java. There's too much abstraction... makes it difficult to really understand what's going on... you've got to teach multiple layers of abstraction before you can even really attempt to. Try explaining the difference between a Java int and a Java Integer to someone with no programming background. Not explaining the difference is going to cause them all sorts of problems, but to explain it you'll have to explain not only all the memory stuff that you would with C, but also explain what an object is, how it affects things, get into mutability, etc, etc. It's a mess.

  • Prez (unregistered) in reply to Xepol

    ... Insert obligatory Spinal Tap quote ...

  • (cs) in reply to snoofle
    snoofle:
    O.M.G.

    Even assuming that he HAD to write his own version of something that was already available, that is the worst implementation I've ever seen, including the stuff my students used to turn in!

    It's just poorly named, it is not a Hashtable at all (notice no use of hashes). If he'd named it DeadStupidMap he would have been fine.

    Or maybe he was doing Hash when he wrote it.

  • (cs)

    I don't think there is any excuse for someone making a living in C# or Java to be unfamiliar or uncomfortable with the collections classes of those platforms.

    I once had a boss who asked me to come up with some coding challenges for use in interviews. One of my questions basically tested whether the candidate was fluent with collections. If they used the built-in ArrayList, HashMap, etc., the exercise would be trivial. If they tried to roll their own list and map implementations, they'd probably not complete the assignment on time.

    My boss said it was an unfair trick question, that you shouldn't expect a developer to know any particular API.

    I wish I'd had this WTF to show him then.

  • Vincent Toups (unregistered)

    This can't be real.

  • (cs)
    DeadStupidMap
    hahaha yeah...
    The hard part of memory management in C/C++ isn'twhen you call malloc/realloc/calloc/new, but when you call free/delete. Especially when you have multiple threads.
    This is one of my pet peeves. People who complain about how hard it is to use free or delete.

    We've all had corruption and seg faults from bad use of free and delete. But think about what that means! It means you are still using stuff after you free it. And that means you don't understand how your code flows.

    And you know what? If you don't understand how your code flows then the seg faulting should be the LEAST of your worries. You need to be in control of your code. Whether you have garbage collection or not.

    So go ahead and write stuff in Java or C#. But if your flow is still out of control then you're still writing crap code. It just doesn't show up as seg faults.

    /rant

  • (cs) in reply to iWantToKeepAnon
    iWantToKeepAnon:
    Phhhftt. Old school?? Hardly ...

    Who needs a processor? Just write the data on 3x5 cards and sort by hand. Now THATS old school. :-)

    You had cards? Luxury!

  • (cs) in reply to Myself
    Myself:
    I showed this to my wife who uses C # to make her living. I am glad that she married well because otherwise she would obviously starve to death! The only thing that she pointed out was that the class member variables should not be public.

    I almost choked on my spit. I told her to take Algorithmization 101. Now I sleep on the couch. :(

    I would recommend changing James' job description from "C-sharp programmer" to "C-blunt writer". That would be, I think, appropriate.

    Poor Yakir.

    Myself

    Hey hey hey, just because you write horrible horrible algorithms and have no concept of search optimizations or hashes or built-in-classes does not mean that you can't follow OOP principals!

  • (cs) in reply to superjer
    superjer:
    DeadStupidMap
    hahaha yeah...
    The hard part of memory management in C/C++ isn'twhen you call malloc/realloc/calloc/new, but when you call free/delete. Especially when you have multiple threads.
    This is one of my pet peeves. People who complain about how hard it is to use free or delete.

    We've all had corruption and seg faults from bad use of free and delete. But think about what that means! It means you are still using stuff after you free it. And that means you don't understand how your code flows.

    And you know what? If you don't understand how your code flows then the seg faulting should be the LEAST of your worries. You need to be in control of your code. Whether you have garbage collection or not.

    So go ahead and write stuff in Java or C#. But if your flow is still out of control then you're still writing crap code. It just doesn't show up as seg faults.

    /rant

    No, sometimes you just get tired and forget to delete, much like in Java I sometimes overlook doing a writer.flush because I got a lot on my mind. Eventually I track it down, but if it caused a memory leak vs bad output, could have been a bad problem.

    If you do something like Writer.close() then Writer.write, then obviously you have no idea how your code flows.

  • (cs) in reply to mfah
    mfah:
    iWantToKeepAnon:
    Phhhftt. Old school?? Hardly ...

    Who needs a processor? Just write the data on 3x5 cards and sort by hand. Now THATS old school. :-)

    You had cards? Luxury!

    Man you people are spoiled with your BINARY... 1s and 0s... back in my day we only had 0s!!!

  • Joon (unregistered) in reply to The Barefoot Bum
    The Barefoot Bum:
    I'm sad, though, that the designers sacrificed rigorous destructor semantics in C# to facilitate automatic memory management. There's a lot of other stuff, not just memory management, that I like to do in destructors.

    Ummmm.... I my be misreading your comment - are you saying that there is no destructor in C-Pound?

    There is:

    public class MyClass { public MyClass() { // do some init }

    ~MyClass() { // Do some finit } }

    You could also implement IDisposable and put your finalisation in the Dispose method

  • (cs) in reply to burned
    burned:
    But I don't give a flying poop how Commons Net implements FTP. Or how the Oracle drivers work.

    Maybe you should. I once managed an order-of-magnitude speedup in a program by changing to a different implementation of FTP. Both were O(n) with respect to the number of files being transferred, but one had far less overhead.

  • Sgt. Preston (unregistered) in reply to TheophileEscargot
    TheophileEscargot:
    ...And since it's an unknown unknown, they're not aware that they're missing anything.
    Very Rumsfeldian:
    Now what is the message there? The message is that there are known "knowns." There are things we know that we know. There are known unknowns. That is to say there are things that we now know we don't know. But there are also unknown unknowns. There are things we don't know we don't know. So when we do the best we can and we pull all this information together, and we then say well that's basically what we see as the situation, that is really only the known knowns and the known unknowns. And each year, we discover a few more of those unknown unknowns.

    Press Conference at NATO Headquarters, Brussels, Belgium, June 6, 2002

  • Gregory A. Beamer (unregistered)

    As long as it compiles, it is ready for production, right? ;-)

  • chiefbutz (unregistered)

    I have one thing to say to this: head desk

  • An Old Fart (unregistered) in reply to Sgt. Preston
    Sgt. Preston:
    Very Rumsfeldian:
    Now what is the message there? The message is that there are known "knowns." There are things we know that we know. There are known unknowns. That is to say there are things that we now know we don't know. But there are also unknown unknowns. There are things we don't know we don't know. So when we do the best we can and we pull all this information together, and we then say well that's basically what we see as the situation, that is really only the known knowns and the known unknowns. And each year, we discover a few more of those unknown unknowns.
    
    Press Conference at NATO Headquarters, Brussels, Belgium, June 6, 2002
    
    The phrase "unknown unknown" significantly predates Rumsfeld's use: unk-unk
  • Ian Clarke (unregistered)

    Sounds like this James guy should be flipping burgers, not writing software.

  • (cs) in reply to dlikhten
    dlikhten:
    ...If you do something like Writer.close() then Writer.write, then obviously you have no idea how your code flows.
    Well obviously you're right but my rant really applies to code flow that's more intricate than sequential calls. When I'm working on a real-time multithreaded app it's a lot harder to keep track of what's allocated and what's not.
  • Ryan Pinto (unregistered)

    And then James got fired !!!

  • Andrew (unregistered) in reply to Devek
    Devek:
    I don't know C#.. but one of the things that has troubled me in the past about "high" level languages(like Java) is that it requires an immense amount of knowledge to be able to do anything correctly while attracting novice programmers left and right.

    Just normal C is easier to program in because you know what your C code is doing for the most part. Novice programmers should start there.

    To write good Java code you have to not only know what your code is doing, but how everything your code is doing is implemented.

    Perfect example of novices using a "high" level language when they don't know enough about coding is Gentoo's portage system. Python is the worst offender when it comes to luring in novices to do something they have no business doing.

    This is today's true WTF!?! C programmers must know much more about code is implemented. C leaves memory management & array-bound checking to the programmer, just to name two. Java & C# are interpreted, and the handle memory, arrays, and most things.

    No one, in my opinion, should learn C as a first language. I learned BASIC & 6502 Assembly (i.e. Apple II) before I tackled C. I probably understood C much better having Assembly Language experience first. Pascal & Fortran are both better first procedural languages.

    Neither Java nor C# are very "high" level langauges. They are Object-Oriented ones. Objects can be made to protect their data, with memory management & array-bound checking, etc. Also, they raise exceptions to show where things went wrong, without crashing!

    Any good programmer can write a HashMap from scratch using C or Java. This one, however, doesn't know what a HashMap is, or how it works. No language can teach someone how to make a HashMap. Java, at least, has a written HashMap class to do it for that programmer.

  • Anon (unregistered) in reply to Joon

    I think he's referring to the fact that in C++ the destructor was guaranteed to be called when the object fell out of scope, was "freed", or when an exception unwound the stack. I'm not sure about C#, but in Python the del "destructor" is not guaranteed to be called EVER since it's called on object deletion which happens at the discretion of the garbage collector. This means that you can't rely on Python "destructors" to release resources like file handles in a timely manner. I suspect that C# (being a GC language) has similar problems with the destructor.

  • Meneer R (unregistered) in reply to Devek

    Yes, those languages do exist actually.

    Perl or Haskell are completely useless if you don't know what you're doing. They scare away most novices.

    On the other hand, they are not really that usefull, even in the hands of experts, for many classes of problems.

    But don't say it isn't possible. Any language can be made to scare away the idiots. For example, making Monads' the only way to do IO.

    CAPTCHA == tastey ... Yeah, don't make languages too tasty or too much like donuts or hamburgers. They attract the wrong crowd.

  • Sorry I Moved to Take This Job (unregistered)

    My boss coded the same thing yesterday. And the day before and every day for the last ten years.

  • Definitely (unregistered) in reply to krupa
    krupa:
    Devek:
    To write good Java code you have to not only know what your code is doing, but how everything your code is doing is implemented.
    How do you figure that? The whole point of OOP is that you don't need to know or care how a class is implemented.

    Well, that may be the spirit of OOP, but when it comes down to it, you do care how Array.sort() is implemented. It could be a bubble sort, a quick sort, or whatever. Once you feed it a large amount of data, it matters.

    I mean, if you call a taxi to take you to the mall 50 miles away, in theory all you want to do is get to the mall. In actuality, you really do care if they show up in a 1960 VW Beetle instead of new Crown Vic. Both will do the required task, but one of them has some definite advantages.

    smile! (captcha)

  • (cs) in reply to AGould
    AGould:
    Ch0:
    Fiona:
    How... did... my god.. I don't understand what these people do to be landed in these jobs.

    That's the thing.

    How can an idiot get a job when I can't? Who do they apply to?

    But then, would I really want to work for the sort of person who'd happily employ an idiot alongside me?

    I was just having that thought myself.

    Although mine was "That's why I'm not a programmer - I'm overqualified."

    It simply isn't possible to be over-qualified for a programming job. The baseline is, effectively, zero.

    VB, ASP, XML, SQL, EJB, PHP ... they're all good. And you can get a hand-wavy job with any of them but -- and here's the catch -- you basically have to lie through your teeth, and find a friend who owns a company to back you up.

    Hell, apparently even Clipper would work for this.

    Have I annoyed a sufficiently large cross-section yet? No? I'd better add Mumps to the list.

    ...

    It depends upon what you think defines a "programmer," mate. If you think it's producing a "solution" as in the OP, and then offering a spurious and incorrect premature optimisation to a non-existent problem, then, yes, indeed, you are over-qualified.

    My tea-lady is over-qualified on these grounds.

    Oops, sorry. My Beverage-supply-solution Person is over-qualified. At least it can boil water. If it exists, which it doesn't. And I don't have one. I am therefore in possession of an imaginary tea-person who is unqualified to fulfill its role in life by writing a marginally less insane version of something that it fondly thinks is a "hash table."

    Unlike my tea-dispensing neuter, however, I am worried on your behalf. Exactly how are you over-qualified? Would that be a PhD? (Tee hee.) Would that be a degree in math, which you suddenly realise is largely irrelevant to all but 0.001% of computer jobs?

    Would it be a degree in linguistics? (In which case, you're just fooling yourself. You are eminently qualified.)

    What, precisely, do you intend to use your over-qualification for?

    I ask, because there sure is a lot of WTF crap out here where we'd be happy to accept a little more than we actually need.

  • (cs) in reply to krupa
    krupa:
    Devek:
    To write good Java code you have to not only know what your code is doing, but how everything your code is doing is implemented.
    How do you figure that? The whole point of OOP is that you don't need to know or care how a class is implemented.

    There are just so many things wrong with that question I don't know where to start.

  • (cs) in reply to Anon
    Anon:
    I think he's referring to the fact that in C++ the destructor was guaranteed to be called when the object fell out of scope, was "freed", or when an exception unwound the stack. I'm not sure about C#, but in Python the __del__ "destructor" is not guaranteed to be called EVER since it's called on object deletion which happens at the discretion of the garbage collector. This means that you can't rely on Python "destructors" to release resources like file handles in a timely manner. I suspect that C# (being a GC language) has similar problems with the destructor.

    The most useful thing you can do with finalizers (the Java version of this) is something like:

    public void finalize() { if(!closed) { System.out.println("Hey you forgot to close me!"); } }

  • (cs) in reply to Ian Clarke
    Ian Clarke:
    Sounds like this James guy should be flipping burgers, not writing software.
    But would you want to eat one?

    I can see it now:

    "I re-implemented the burger-flipping protocol so that it used no spatulas. Maintenance costs alone mean that using a single spatula to flip a burger is too slow. It's not my fault that the line manager insisted on pushing the burger out to the customer before the bottom of the burger warmed up. Also, it's not my fault that the top side of the burger turned to charcoal. They should turn the flame down on those things, y'know?

    "Plus which, I don't understand this fetish about mayo. I mean, that's just inefficient. You gotta collect the egg, transport it, break it, mush it ... I mean, this stuff never ends.

    "What's wrong with just snorting the contents of your nose over the burger? I mean, same mouth-feel, same consistency, same taste. It even has the same colour.

    "What's the big deal?"

    No. I think you want properly qualified Central American illegal immigrants to be flipping your burgers.

    You want James to be President of the United States.

    Well, he could hardly be more of a fuck-up, could he?

  • Skipper (unregistered)

    The guy who wrote the hashtable is actually correct, as can be found by analyzing the complexity orders of both hashtable implementations. The built-in hashtable has many functions, that is to say "n" functions , while his has only 3. Therefore, his implementation is O(3) = O(1) complexity order, while the built-in is O(n) complexity order. Brillant.

  • A. Non Mouse (unregistered) in reply to Anon

    Correct. In C#, even if you implement IDisposable and slap something in Dispose(), you're still at the mercy of the GC as to when things get taken care of. While I don't have any C/++ experience, I do know that difference exists. If you wanted performance that requires proper disposal of objects, perhaps something like C# isn't what you should be using anyway...

  • Aranazo (unregistered)

    I found something similar in the c++ code of a departed collegue. He'd optimized by inserting into a sorted array and doing a binary search for lookup. This code in this WTF has the advantage of being much easier to understand and replace.

    Recruiting graduates will not help you. My UK Computer Science Degree didn't cover hash tables. In any case they can't teach you everything, if you don't have the capacity to learn important stuff for yourself I.T. is probably the wrong career.

  • Zippy (unregistered)

    too... stupid... to... live...

  • (cs) in reply to A. Non Mouse
    A. Non Mouse:
    Correct. In C#, even if you implement IDisposable and slap something in Dispose(), you're still at the mercy of the GC as to when things get taken care of. While I don't have any C/++ experience, I do know that difference exists. If you wanted performance that requires proper disposal of objects, perhaps something like C# isn't what you should be using anyway...

    Actually, Dispose has to be called manually by the developer and is thus totally predictable. You're thinking of Finalize, which is called by the GC when it decides to run on a class instance.

  • (cs) in reply to Definitely
    Definitely:
    krupa:
    Devek:
    To write good Java code you have to not only know what your code is doing, but how everything your code is doing is implemented.
    How do you figure that? The whole point of OOP is that you don't need to know or care how a class is implemented.

    Well, that may be the spirit of OOP, but when it comes down to it, you do care how Array.sort() is implemented. It could be a bubble sort, a quick sort, or whatever. Once you feed it a large amount of data, it matters.

    I mean, if you call a taxi to take you to the mall 50 miles away, in theory all you want to do is get to the mall. In actuality, you really do care if they show up in a 1960 VW Beetle instead of new Crown Vic. Both will do the required task, but one of them has some definite advantages.

    smile! (captcha)

    It's more than the spirit: it's the essence of OOP. (And I'm aware that there are probably a number of Pelagian heretics out there who will disagree with me on this.)

    Except in insane and unusual circumstances, you can probably assume with a fair degree of certainty that your favourite library for your favourite language on your favourite hardware is not, in fact, a bubble-sort.

    In more unusual cases, I prefer to pick my own library. Which is why I prefer C++ to C# or Java.

    (Yes, I can hear those screams in the background.)

    The tiny problem with bundling libraries with a language is that those libraries tend to take on a life of their own. Much as I appreciate the C++ standard from a compiler point of view, I can't tell you how happy I was to be able to substitute STLport for either Rogue Wave or the defective Sun alternative. In that restrictive language space, I've made myself equally happy by replacing Microsofts' crappy STL implementation with something better (ie the real thing).

    Strangely enough, that wasn't Microsoft's fault. Dinkumware just got caught up in the legal crap to do with an over-rated piece of browser crap that was challenging a useless heap of garbage (Netscape 4) at the time. You can argue browser wars all you want, but it's not clear to me why Microsoft were consequently forbidden to implement the STL properly.

    BTW: I'm hoping to be back in northern California sometime in the new year. Got a Crown Vic you want to sell me? I love those. Particularly the ex-police ones (which are probably the only ones on the market right now).

  • Franz Kafka (unregistered) in reply to Joon
    Joon:
    There is:

    public class MyClass { public MyClass() { // do some init }

    ~MyClass() { // Do some finit } }

    You could also implement IDisposable and put your finalisation in the Dispose method

    is it like java where there is not guarantee that ~Class will ever be called?

  • heh (unregistered)

    who cares

  • anoney (unregistered) in reply to hunter9000
    hunter9000:
    Grovesy:
    anti-cynic:
    Better yet, screw functions:

    { }

    Screw code!, machine code all the way baby...

    Pfft! Machine code's for noobs. I feed instructions directly into the processor with a straight key. Old school baby.

    pfff I use an ABACUS

  • (cs) in reply to dlikhten
    dlikhten:
    mfah:
    iWantToKeepAnon:
    Phhhftt. Old school?? Hardly ...

    Who needs a processor? Just write the data on 3x5 cards and sort by hand. Now THATS old school. :-)

    You had cards? Luxury!

    Man you people are spoiled with your BINARY... 1s and 0s... back in my day we only had 0s!!!

    Who needs 0s? I communicate with other humans directly, not via this newfangled 'language' stuff but by direct physical contact, if you know what I mean.

    (waiting for someone to claim to exist in -1 dimensional space or somesuch)

  • (cs) in reply to TheophileEscargot
    TheophileEscargot:
    I think this is a good counterexample to the people who say that CS degrees are pointless since most of the content is never used. Self-taught programmers can often have big gaps in their knowledge like this, since they've never had to learn boring stuff like data structures. And since it's an unknown unknown, they're not aware that they're missing anything.

    Right. Because self-taught programmers never, ever learn about data structures, and people with CS degrees never make stupid data structure choices.

    I'd be willing to bet the idiot who wrote the code in this article had a CS degree.

  • (cs) in reply to superjer
    We've all had corruption and seg faults from bad use of free and delete. But think about what that means! It means you are still using stuff after you free it. And that means you don't understand how your code flows.

    And you know what? If you don't understand how your code flows then the seg faulting should be the LEAST of your worries. You need to be in control of your code. Whether you have garbage collection or not.

    So go ahead and write stuff in Java or C#. But if your flow is still out of control then you're still writing crap code. It just doesn't show up as seg faults.

    In the simple to moderate cases, this is perfectly true. In fact I expect most errors of this sort that people make are where they forget how the code flows (or just plain forget to free/delete).

    However there are cases (especially when writing threadsafe libraries of certain types) where there is no way to know for sure if a given object is being used other than to use GC or reference counting. In those cases trying to tack on GC of some sort can be a PITA.

  • JohnFx (unregistered) in reply to TheophileEscargot
    TheophileEscargot:
    I've seen similar things before, like a programmer with years of experience not knowing that there's anything faster than Bubble Sort.

    I defy you to find anything faster than a Bubble sort! *

    • Offer not valid for arrays larger than 2 elements.
  • David (unregistered)

    I don't know why people always knock Bubble Sort. It works, it's easy to code, and most of the time it's fast enough. Of course you need to understand when NOT to use bubble sort too.

    If you need thousands or millions of items in order (as I often do), use the power of SQL to get them in the right order in the first place. Hopefully the database system designer used a more efficient sort, and spent a LOT of time optimising it.

    As to a hashtable class - once I'd taught myself Perl a few years ago, I found the lack of hash in other languages so annoying that I actually wrote a hash class in VBA! Which I use all the time now. On performance, it takes a few microseconds per add or lookup, so long as the hash size isn't too big. I found that VBA breaks with memory allocation problems if the hash has much more than about 7 million entries. (Yes I know about Collections but they don't do most of what hash should do.)

    So now I come to the real WFT here. Not only is James not using a library far better written than he can do, he has no idea WHY a hashtable is called a hashtable. BECAUSE IT USES A HASH TO DO LOOKUPS. Linear search? WTF!!

Leave a comment on “It Had Too Many Functions”

Log In or post as a guest

Replying to comment #:

« Return to Article