• maht (unregistered) in reply to mcrbids
    mcrbids:

    So, really, what's the WTF? Please explain. No, I'm not satisfied with "ooh, the eyes!", either.

    Seems to me that the WTF here is a programmer unable to challenge himself, and perhaps too dependent on alcohol.


    The WTF is really because all the structure is magic

    want the price for the Black & Decker "Auto Tape Measure" code ATM100
    it is STORRAY_Products(14, 5)

    so the accessors are all magic

    it wouldn't be so impossible to keep the NO SQL part but add significant structure

    Class product
        Public manufacturer
        Public name
        Public code
        Public image
        Public description_html
        Public price
        Public weight
        Public flag
    End Class

    Dim STORRAY_Products(487)

    Set STORRAY_Products(14) = new product

    STORRAY_Products(14).manufacturer = "Black & Decker"
    STORRAY_Products(14).name = "Auto Tape Measure"
    STORRAY_Products(14).code = "ATM100"
    STORRAY_Products(14).image = "/products/images/bd_atm100.gif"
    STORRAY_Products(14).description_html = "<p>Extend and retract with the push of a button<ul><li>Blade ... "
    STORRAY_Products(14).price = "21.99"
    STORRAY_Products(14).weight = "2"
    STORRAY_Products(14).flag = "True"

    So the price for the Black & Decker "Auto Tape Measure" code ATM100 becomes STORRAY_Products(14).price
    the only way to search the array is by index so you would have accessor helpers

    Public function get_product(manufacturer, code) ' O(n)
        For Each p In STORRAY_Products
            If isObject(p) Then
                If p.manufacturer = manufacturer And p.code = code Then
                    set get_product = p
                    Exit Function
                End If
            End If
        Next
    End Function

    response.write get_product("Black & Decker", "ATM100").price

  • (cs) in reply to hank miller

    No, ammoq, that function only saves the array, it does not generate it (look at the signature for the function - note the array that is being passed in)

  • (cs) in reply to maht
    Anonymous:


    it wouldn't be so impossible to keep the NO SQL part but add significant structure

    Class product
        Public manufacturer
        Public name
        Public code
        Public image
        Public description_html
        Public price
        Public weight
        Public flag
    End Class



    This counts as an attempt to do the wrong (Q&D) thing right. IMO not a good idea.
    Eighter keep it quick&dirty, so at least it's as simple as possible; or do the right thing - use a database.
  • maht (unregistered) in reply to maht

    I battled with the forum s/w that I missed these points

    • The above class is also serializable in the same way the original is

    • It wouldn't take more than a few sed scripts to change the code

      s/STORRAY_Products\(([0-9]+),( +?)5\)/STORRAY_Products(\1).price/g

    • The existing "developers" wouldn't take too long to get used to it
  • (cs) in reply to Jeff S
    Jeff S:
    SeekerDarksteel:

    voodooc:
    The *real* WTF here, is why didn't he use a hash instead of an array?

    vc

     

    I dunno if you've ever messed around with VB's Scripting.Dictionary object (afaik the easiest (only?) way to do hashes in VB), but they are extremely annoying to work with.  Massive bugs can occur because you fail to use cStr around either a key or a data item.  Just last week I was having a problem where I was getting data out of the hash that I had never put in.  Worse, if I tried to use certain keys to access the data the page would error out.  It turns out that the problem was that I didn't cast the data as cStr before putting it in the dictionary.

     

    Now, I know you were probably joking about using hashes given the tell-tale "The real WTF here is...", but I just wanted to use this opportunity to bitch about hashes in VB without being entirely off-topic.



    Yeah, it sucks that you have to use proper data types and everything ... even worse, sometimes you even have to declare variables!  

     

    Ah, right, that must have been my problem.  I was supposed to pass the dictionary object a string, but instead I passed it a string!  Ah, that makes so much more sense now.  Perfectly clear.  Yep.  How stupid of me. 

    VB is supposed to be taking care of casting.  And it does perfectly fine when I pass in integers.  Yet somehow it arbitrarily needs an explicit cast when I pass in strings.  And I'm supposed to somehow magically know that VB isn't going to pass my string into the dictionary object right?  If VB is not going to require explicit casts then it damn well better make sure that it knows what to implictly cast as.  In this case it obviously doesn't and screws something up.  I have no control over what data type VB uses without explicitly casting EVERYTHING.  (Even then I don't have full control as VB may perform an implicit cast AFTER my explicit cast, happily routing around what it thinks is an error, regardless of what I really want.)  Casting everything by hand is a rediculous waste of space and makes code near unreadable.  Instead I have to wait for improper conversions to break my code and then try to fix it.

    So let's make a deal.  I won't assume that VB is always going to properly cast my variables and you won't assume that everyone else is an idiot and beneath you and your clearly infinite knowledge of using "proper data types."  After all you know what they say about assuming.  It makes an "ass" out of "u" and ...err...well actually I guess that's all it's doing here.  [;)] 

  • (cs) in reply to johnl
    johnl:
    No, ammoq, that function only saves the array, it does not generate it (look at the signature for the function - note the array that is being passed in)


    Correct. This is how Product.asp is written. The array is created by including Product.asp into the page (probably every page that needs "access" to the product array).

    So the live cycle goes like this:
    a) you start with an almost empty Product.asp page:
    <%
    Dim STORRAY_Products(0, 7)
    %>
    (To make the example easier, let's assume you can define an array with a size of 0; I don't know if VB allows that)

    Then some program accepts user input and adds it to the array. Or it imports some file (CSV, XML, who knows)

    ReDim STORRAY_Products(UBound(STORRAY_Products, 1)+1,  UBound(STORRAY_Products,2))
    i = UBound(STORRAY_Products, 1)
    STORRAY_Products(i,1)=vendor;
    STORRAY_Products(i,1)=desc;
    ...

    at the end, the new array is written back to Products.asp

    Function STORRAYLIB_SaveArray("Products", STORRAY_Products);

    Repeat that 345 times, and you have the full product database!



  • [Si]dragon (unregistered)

    …[W]ithout saying a word, got up, [and] left…

    Yes, correct answer (and the beauty of being a consultant). There are so many people in this industry who haven’t a clue about how to design and build software properly. But the unfortunate thing is, these people are often supported by others who do know what they’re doing. This ultimately makes them productive and keeps them in their jobs.

    If everyone who was brought in to try to clean up that mess just left as they ought to, the person responsible would eventually be left to deal with it by himself. Ultimately, he is going to reach a certain limit and fail to meet expectations. Soon after, one would hope he would be replaced with someone competent.

    Of course, that might just be hopeless optimism for me, especially considering that I have worked with people who have “nine years of experience”, but were utterly clueless when it came to rudimentary topics. Nevertheless, getting up and walking out on this kind of incompetence is a good start.

  • (cs) in reply to SeekerDarksteel

    SeekerDarksteel:
    Of course this is coming from the same person who couldn't stop laughing for 5 minutes after thinking about the idea of pcAnywhere'ing into a remote box, then pcAnywhere'ing back into my own box.  Speaking of which, I need to try that sometime. 

    My God, man!  You'll rip a hole in the fabric of space-time!

    Actually, one of my co-workers did something similar.  From work, he VNC'd to his Macintosh at home, from which he RDP'd to a virtual machine (on the same box) running Win2k3, from which he RDP'd to a third machine hosted by a friend (the extra step was necessary because he had to copy some files from one machine to the other).  Everything was fine until he had to "CTRL-ALT-Del" to log in to the final machine and had a hard time figuring out how to get the command all the way there - both VNC and RDP wanted to intercept it...

  • (cs) in reply to ammoQ

    Yeah, I understood all that ammoq, but what I was trying to get at was this:

    Then some program accepts user input and adds it to the array. Or it imports some file (CSV, XML, who knows)

    Now, I suppose it could have been generated by user input, but I was assuming (wrongly, rightly, I don't know) that it was importing a file. Now, wouldn't it have made more sense to simply use that file rather than write it all to Products.asp?  My point was that the data came from somewhere, and we don't know where.  Given that, I can't see the reason for this method.  To be honest, though, wherever the data came from, chances are that a different method of storing the data could have been found.

  • (cs) in reply to ammoQ

    ammoQ:
    It's always easy to say "throw it away, do it right" if you have the budget. Don't get me wrong, the storray engine is not my baby and I don't feel like using it for my next project. But at least it's Q&D, a big advantage compared to many pathetic WTFs which are so large and complex that "throw it away" is something the ties won't accept.

    You are ignoring the fact that they were willing to pay an independant consultant to come in and show them how to port it to asp.net.  So you're whole Q&D troll argument goes out the window.

  • (cs) in reply to GalacticCowboy
    GalacticCowboy:

    SeekerDarksteel:
    Of course this is coming from the same person who couldn't stop laughing for 5 minutes after thinking about the idea of pcAnywhere'ing into a remote box, then pcAnywhere'ing back into my own box.  Speaking of which, I need to try that sometime. 

    My God, man!  You'll rip a hole in the fabric of space-time!

    Actually, one of my co-workers did something similar.  From work, he VNC'd to his Macintosh at home, from which he RDP'd to a virtual machine (on the same box) running Win2k3, from which he RDP'd to a third machine hosted by a friend (the extra step was necessary because he had to copy some files from one machine to the other).  Everything was fine until he had to "CTRL-ALT-Del" to log in to the final machine and had a hard time figuring out how to get the command all the way there - both VNC and RDP wanted to intercept it...



    That's not that unusual. If you have many customers, each using a different remote access method (VPN, modem dialup), and many people who might have to do maintenance to all of those customers, you likely end up with one or two "hubs" with all the VPN software installed, modem attached etc; technicians access the customers' sites through the "hubs", because it would be to complicated to install all VPN products on every technician's PC.
  • (cs)
    Alex Papadimoulis:

    At the requirements meeting, the brain behind the engine gave a quick summary: it's like having the benefit of a database without ever having to use SQL, ADO, or any of that stuff; just simple arrays.


    All the benefits of a database, except for atomicity, consistency, isolation, or durability... oh wait...

    Alex Papadimoulis:

    With a grin from ear to ear, proud to be showing off his masterpiece, the programmer proclaimed, Although Steve was trying to figure out a professional exit strategy at this point, he just had to ask about maintenance. The programmer gleefully replied that's where the *real* Storray Engine lies.



    It looks like Alex left something out here, in between "proclaimed," and "Although".

  • (cs) in reply to JohnO
    JohnO:

    ammoQ:
    It's always easy to say "throw it away, do it right" if you have the budget. Don't get me wrong, the storray engine is not my baby and I don't feel like using it for my next project. But at least it's Q&D, a big advantage compared to many pathetic WTFs which are so large and complex that "throw it away" is something the ties won't accept.

    You are ignoring the fact that they were willing to pay an independant consultant to come in and show them how to port it to asp.net.  So you're whole Q&D troll argument goes out the window.


    I guess they thought porting it to ASP.net would be easy; throw into the automagical converter, push a few buttons and voila - here comes the brand new ASP.net solution. And this is what the consultant could have done:
    a) (low budget) serialize/deserialize the array to/from a file, keep the rest. If they were happy with the storray engine, they may alos be happy with the storealize engine.
    b) (high budget) do the right thing, use a database
    c) (no bonus) insult the customer, run away
  • (cs) in reply to SeekerDarksteel
    SeekerDarksteel:
    Jeff S:
    SeekerDarksteel:

    voodooc:
    The *real* WTF here, is why didn't he use a hash instead of an array?

    vc

     

    I dunno if you've ever messed around with VB's Scripting.Dictionary object (afaik the easiest (only?) way to do hashes in VB), but they are extremely annoying to work with.  Massive bugs can occur because you fail to use cStr around either a key or a data item.  Just last week I was having a problem where I was getting data out of the hash that I had never put in.  Worse, if I tried to use certain keys to access the data the page would error out.  It turns out that the problem was that I didn't cast the data as cStr before putting it in the dictionary.

     

    Now, I know you were probably joking about using hashes given the tell-tale "The real WTF here is...", but I just wanted to use this opportunity to bitch about hashes in VB without being entirely off-topic.



    Yeah, it sucks that you have to use proper data types and everything ... even worse, sometimes you even have to declare variables!  

     

    Ah, right, that must have been my problem.  I was supposed to pass the dictionary object a string, but instead I passed it a string!  Ah, that makes so much more sense now.  Perfectly clear.  Yep.  How stupid of me. 

    VB is supposed to be taking care of casting.  And it does perfectly fine when I pass in integers.  Yet somehow it arbitrarily needs an explicit cast when I pass in strings.  And I'm supposed to somehow magically know that VB isn't going to pass my string into the dictionary object right?  If VB is not going to require explicit casts then it damn well better make sure that it knows what to implictly cast as.  In this case it obviously doesn't and screws something up.  I have no control over what data type VB uses without explicitly casting EVERYTHING.  (Even then I don't have full control as VB may perform an implicit cast AFTER my explicit cast, happily routing around what it thinks is an error, regardless of what I really want.)  Casting everything by hand is a rediculous waste of space and makes code near unreadable.  Instead I have to wait for improper conversions to break my code and then try to fix it.

    So let's make a deal.  I won't assume that VB is always going to properly cast my variables and you won't assume that everyone else is an idiot and beneath you and your clearly infinite knowledge of using "proper data types."  After all you know what they say about assuming.  It makes an "ass" out of "u" and ...err...well actually I guess that's all it's doing here.  [;)] 

    Are you talking about VB or VBScript?   It sounds like VBScript, which is very different from VB.   In VB you can easily declare data types and all that, but in VBScript the types are hidden from you and often you do require explicit casting.  But if you are talking about VBScript, say VBScript.

    If you are talking about VB, then I'll need you to submit some sample code showing this behavoir before I can decide wether or not you are "beneath" me . 

  • (cs) in reply to Jeff S

    Err, yes, VBScript.  Generally when I mean VB I specify VB6 or VB.net (depending on which).  Since TWTF was in VBScript I assumed (hehe, oops[:$]) people would understand I was speaking from the context of VBScript, not VB6.

     

    Just for further information, the problem apparently (not entirely sure) happens on occasion when I have a line like:

    Dict.Add "mykey", RecSet("SomeData")

    Where RecSet is an ADODB RecordSet object.  The thing is it only happens sometimes.  I've used lines like that before no problem, but for some reason on a new page I was writing this problem cropped up. 

  • (cs)

    This must be how google does it, it explains why they have such fast results.  Just one big array of 9.1 billion URLs.

  • (cs) in reply to SeekerDarksteel
    SeekerDarksteel:

    Err, yes, VBScript.  Generally when I mean VB I specify VB6 or VB.net (depending on which).  Since TWTF was in VBScript I assumed (hehe, oops[:$]) people would understand I was speaking from the context of VBScript, not VB6.

     

    Just for further information, the problem apparently (not entirely sure) happens on occasion when I have a line like:

    Dict.Add "mykey", RecSet("SomeData")

    Where RecSet is an ADODB RecordSet object.  The thing is it only happens sometimes.  I've used lines like that before no problem, but for some reason on a new page I was writing this problem cropped up. 

    I've had this problem in VB6 as well.  RecSet("SomeData") gets added as some sort of ADO wrapper type instead of the actual field value.  When the recordset goes out of scope, you can no longer reference the object stored in the dictionary.  I always had to store the rs!field to a local variable and then add it to the collection to get around this.  Not sure what causes it either.

  • (cs) in reply to SeekerDarksteel

    > Dict.Add "mykey", RecSet("SomeData")

    > Where RecSet is an ADODB RecordSet object

    Hmmm... I have had troubles with ADODB record set value retrieval in VBScript, even without dictionaries.

    Are you accessing the fields in the same order that they are being returned by the query?

    Are there any text/ntext/image fields? (BLOB fields)
  • (cs) in reply to JohnO

    > RecSet("SomeData") gets added as some sort of ADO wrapper type instead of the actual field value.

    Ah... try RecSet("SomeData").Value or even CStr(RecSet("SomeData").Value)

  • (cs) in reply to Maurits
    Maurits:
    > RecSet("SomeData") gets added as some sort of ADO wrapper type instead of the actual field value.

    Ah... try RecSet("SomeData").Value or even CStr(RecSet("SomeData").Value)


    Either way, a variant is returned.  You should *always* cast it to String if that it what it is.  This is the same as ADO.NET, which returns Objects and all values should be cast as well.
  • (cs) in reply to SeekerDarksteel
    SeekerDarksteel:

    Err, yes, VBScript.  Generally when I mean VB I specify VB6 or VB.net (depending on which).  Since TWTF was in VBScript I assumed (hehe, oops[:$]) people would understand I was speaking from the context of VBScript, not VB6.

     

    Just for further information, the problem apparently (not entirely sure) happens on occasion when I have a line like:

    Dict.Add "mykey", RecSet("SomeData")

    Where RecSet is an ADODB RecordSet object.  The thing is it only happens sometimes.  I've used lines like that before no problem, but for some reason on a new page I was writing this problem cropped up. 


    Now it makes a little more sense.  If you didn't repeat the letters "VB" over and over, I probably would have assumed you meant VBScript.  Either way, you were complaining about the Dictionary object when the issue you are having is with an ADO Recordset object.  The default property returns a VARIANT -- you must cast it to the proper data type.  The computer doesn't automatically convert variants to what you think it should be.  A single property, in any strongly typed modern language I can think of, cannot sometimes return a string, sometimes an int, sometimes a date from call to call.   (without overloads)
  • (cs) in reply to stevekj
    stevekj:
    Alex Papadimoulis:

    With a grin from ear to ear, proud to be showing off his masterpiece, the programmer proclaimed, Although Steve was trying to figure out a professional exit strategy at this point, he just had to ask about maintenance. The programmer gleefully replied that's where the *real* Storray Engine lies.



    It looks like Alex left something out here, in between "proclaimed," and "Although".

    This is what happens when I edit posts ... it *was* in there at some point :-)

  • (cs) in reply to ammoQ

    ammoQ:
    Jeff S:
    The #1 rule any programmer should know: always separate your code from your data.


    Are prolog programs data or code?
    Are Postscript, PDF and WMF data or code?

    Student: Master, are prolog programs data or code?

    Master: Does not Trollable account to us of the many wonders of Lisp, in which code and data are as one?

    S: Does that mean that the distinction between data and code is an artifact of the mind?

    M: There is no spoon.

    S: But surely there is a reason for creating this separation, or it would not have been made?

    M: To a bird, a worm is a meal; to a cat, a bird; and when the cat dies, it becomes a meal to worms.

    S: So code can be data, and data code?

    M: To a compiler, code is data; to a backup utility, a compiler is data; so, you see, everything is data, and everything is code.

    S: Right. Screw this Zen shit, I'm joining Steve at the bar ...

    M: Mu!

  • (cs) in reply to SeekerDarksteel
    SeekerDarksteel:
    rogthefrog:
    SeekerDarksteel:

    Until then, I must go ponder...after all...what is the sound of one asp page rewriting itself?



    A giant sucking sound, to be sure.

     

    I dont know.  I just feel so sure that there has to be some kind of...i dunno...awesome application for self-rewriting asp files.  I just can't think of it yet.

     

    Of course this is coming from the same person who couldn't stop laughing for 5 minutes after thinking about the idea of pcAnywhere'ing into a remote box, then pcAnywhere'ing back into my own box.  Speaking of which, I need to try that sometime. 

     

    I have done it with logmein.com through 4 machines...craazzzzzy

  • (cs) in reply to Cheddar

    Anonymous:
    Speaking of in memory databases, a company I worked for thought that preloading 30 days worth of applications and persisting them as a dataset on a shared session server (asp.net) would save tons of time when people are viewing the content.

    Pity for the poor guy who was the first to access the application each day, his request would usually time out before he got a response.

    Add to this the wonderful consequence of having to update the db and dataset every time something changed.

    The problems people create trying to avoid problems they should fix are usually worse.


     

    Amen!!!

  • (cs) in reply to rbriem
    rbriem:

    ammoQ:
    Jeff S:
    The #1 rule any programmer should know: always separate your code from your data.


    Are prolog programs data or code?
    Are Postscript, PDF and WMF data or code?

    Student: Master, are prolog programs data or code?

    Master: Does not Trollable account to us of the many wonders of Lisp, in which code and data are as one?

    S: Does that mean that the distinction between data and code is an artifact of the mind?

    M: There is no spoon.

    S: But surely there is a reason for creating this separation, or it would not have been made?

    M: To a bird, a worm is a meal; to a cat, a bird; and when the cat dies, it becomes a meal to worms.

    S: So code can be data, and data code?

    M: To a compiler, code is data; to a backup utility, a compiler is data; so, you see, everything is data, and everything is code.

    S: Right. Screw this Zen shit, I'm joining Steve at the bar ...

    M: Mu!



    *lol*  +1 insightfull
  • (cs) in reply to mcrbids
    mcrbids:
    I've used solutions like this where part of the spec is that no flavor of SQL is available, and there's a need to store complex sets of data in files. He at least abstracted maintenance into a single, uniform method!

    There's an awesome acronym that you should learn, it's called ORM, or Object-Relational Mapper.

    It's like, mapping relationalish databases to object, and never manipulate any SQL in your code, only objects, and the ORM engines does it's magic behind the scene.

    Not the fastest stuff on earth (unless you go into the ORM engine/objects definition and tweak the queries), but it's Good Enough and it usually Just Works (a very good example of ORM is Ruby's ActiveRecords that you can find in RoR)

    Satanicpuppy:
    Anonymous:
    That's awesome.  I saw something very similar to that about a week ago in the wild during a consulting gig.  Scary that is probably very prevalent.
    I put together something like this for an e-commerce site that "couldn't afford database hosting" and "only had a few products"...

    SQLite, it's like flat files, but good.

    hank miller:
    Here is a clue: there are a number of free SQL databases that you can link to.

    And then there is SQLite, a database-less database for the times when you really can't use a "real" db

  • Plonk (unregistered) in reply to Jeff S

    Jeff S:
    mcrbids:
    I've used solutions like this where part of the spec is that no flavor of SQL is available, and there's a need to store complex sets of data in files. He at least abstracted maintenance into a single, uniform method!

    So, really, what's the WTF? Please explain. No, I'm not satisfied with "ooh, the eyes!", either.

    Yes, you end up with limits on storage size, and SQL is the preferred choice. But, with the limitations mentioned above, what's the "non-WTF" answer to this kind of problem?

    Seems to me that the WTF here is a programmer unable to challenge himself, and perhaps too dependent on alcohol.
    A simple CSV file used to store the data -- separate from the code -- is far preferable to the mess we see here. And the JET engine using a simple MDB file, while certainly not ideal for a busy site, is 100% free when using ASP and far more robust, flexible and maintainable then what we see here. The #1 rule any programmer should know: always separate your code from your data.

    What! JET (aka MS Access to most) should never be used. Rather you should spend thousands on an Oracle server, even if it's one table with 100 records and 3 users. Or conversely use XML as it's far cooler. JET only exists for real developers to sneer at and you should never touch it. Your geek cred will immediately decrease to near zero and chicks won't dig you.

  • (cs)

    I haven't been to thedailywtf for a few days, so I figured I'd use this as an opportunity to catch up. After seeing this code, I think I need to find something else to do to take my mind off of it for a while. This is just disturbing.

  • maht (unregistered) in reply to ammoQ
    ammoQ:


    This counts as an attempt to do the wrong (Q&D) thing right. IMO not a good idea.
    Eighter keep it quick&dirty, so at least it's as simple as possible; or do the right thing - use a database.


    Oh, I agree totally, don't do it that way !!



  • (cs) in reply to ammoQ
    ammoQ:
    look at www.ammoq.com

    Ignoring the shamless self-promotion, I did look. And I was horrified. You have to love the use of tables that throw off the entire format. Like the "About" page, where you have a three page column of text 2-3 words wide because of the picture. Beautiful. Now,  Mr. Kitzmüller, we require the real name of this "winter_mute" to also avoid in the future.

    Oh, and I really love the irony of having an acronym for "quick and dirty."

    On topic:
    I'm surprised no one has speculated as to how our hero Steve acquired the source code if he left the first and only meeting so promptly.
  • Clinton (unregistered) in reply to Richard Nixon

    Indeed, if it were not for guns we'd just kill people by humping on them with a really cold turkey

  • (cs) in reply to rholliday
    rholliday:
    ammoQ:
    look at www.ammoq.com

    Ignoring the shamless self-promotion, I did look. And I was horrified. You have to love the use of tables that throw off the entire format. Like the "About" page, where you have a three page column of text 2-3 words wide because of the picture.

    fixed the about page, thanks

    Beautiful. Now,  Mr. Kitzmüller, we require the real name of this "winter_mute" to also avoid in the future.

    Google is your friend.

  • (cs) in reply to ammoQ

    ammoQ:
    rholliday:
    ammoQ:
    look at www.ammoq.com

    Ignoring the shamless self-promotion, I did look. And I was horrified. You have to love the use of tables that throw off the entire format. Like the "About" page, where you have a three page column of text 2-3 words wide because of the picture.

    fixed the about page, thanks

    Beautiful. Now,  Mr. Kitzmüller, we require the real name of this "winter_mute" to also avoid in the future.

    Google is your friend.

    ammoQ:
    rholliday:
    ammoQ:
    look at www.ammoq.com
    Ignoring the shamless self-promotion, I did look. And I was horrified. You have to love the use of tables that throw off the entire format. Like the "About" page, where you have a three page column of text 2-3 words wide because of the picture.
    fixed the about page, thanks
    Beautiful. Now, Mr. Kitzmüller, we require the real name of this "winter_mute" to also avoid in the future.
    Google is your friend.

    I'm afraid that the "About" page is still broken. Basically, it still looks horrible at 800x600, which is why you shouldn't test only your website in your 1024x768 screen :)

    What about placing the text and the image in the same cell using floats and also adding some padding or some margin to your cell instead of adding an empty cell to separate things:

    
    <td style="padding-right:25px;"  >
    
      <H3>About ammoQ<H3>
    
      <div style="float:right;"> 
        <img .... > 
      <div>
    
      <p>ammoQ (real name: ...... etc.</p>
    
      <p>The nickname ....</p>
    
      ....
    
    </td>
    
    

    And, if your hosting allows you to use some dynamic language, please get rid of frames, by simply using "include file=main.html" from the top of every page. They serve no purpose that I can see and that a dynamic include won't do better (like allowing me to link directly to the about page whithout having to dig into the page source code for the adderess of the inside-of-the-frame page).

  • (cs) in reply to Enric Naval

    Enric, you are right with everything.
    A minimum resolution of 1024x768 is ok in the given context (1280x1024, as before, probably was not).
    I'm totally sure it could be made much better by someone who is experienced with the current trends in (X)HTML, CSS, JavaScript etc.
    Unfortunately, that someone is not me. I basically stuck with HTML 3.2, because I haven't made reasonably large web -apps for at least 4 years. Plus: the layout of the current "ammoq" homepage wasn't even made by me. It looks mostly OK under reasonable conditions, and it doesn't sell me anything. If it looks horrible on a PocketPC or PSP, I couldn't care less.
    The frame thingy is from the so-called "URL kepper", because the web site is hosted in the tiny webspace I got with my internet account (members.chello.at/erich.kitzmueller/...) and I use DomainDirects service to forward "www.ammoq.com" there.

  • wtijsma (unregistered) in reply to rogthefrog
    rogthefrog:
    SeekerDarksteel:

    Until then, I must go ponder...after all...what is the sound of one asp page rewriting itself?



    A giant sucking sound, to be sure.

    ROFL, Ah I was still wiping the tears from my eyes, thanks for making them come back again

  • wtijsma (unregistered) in reply to ammoQ

    ammoQ:
    Jeff S:
    The #1 rule any programmer should know: always separate your code from your data.


    Are prolog programs data or code?
    Are Postscript, PDF and WMF data or code?

    Well, don't the latest security issues with WMF say enough? WMF,  doc/xls/ppt  documents with macro's embedded etc. etc.

    Come on, when I get an Access database/program from a customer, I have to click through 3 screens of security warnings of which at least 1 I can't turn off.

    Ok maybe these are MS leaks, but I don't know anyone that really likes working with PDF or PostScript files either. What I mean to say I hope that stuff gets replaced ASAP with file/data formats that DO separate all aspects.

  • Ross Presser (unregistered) in reply to SeekerDarksteel
    SeekerDarksteel:
    Of course this is coming from the same person who couldn't stop laughing for 5 minutes after thinking about the idea of pcAnywhere'ing into a remote box, then pcAnywhere'ing back into my own box.  Speaking of which, I need to try that sometime. 

    Try "vncviewer localhost" sometime on a machine where loopback connections are enabled. It completely obviates the need for drugs.

  • Ross Presser (unregistered) in reply to wtijsma
    Anonymous:
    Ok maybe these are MS leaks, but I don't know anyone that really likes working with PDF or PostScript files either. What I mean to say I hope that stuff gets replaced ASAP with file/data formats that DO separate all aspects.


    PDF is pure data unless you start putting javascript into it.  Postscript on the other hand is pure code. There isn't even such a thing as a font; it's a program that draws bezier curves based on the input data.

    I *love* working with postscript and PDF. I have just put the wraps on an in-house project that writes postscript which can be used three ways: send it to the Xerox printer, where all the images are stored on the printer hard drive and are read in at print time (known as "decomposition" in Xerox lingo); view it on screen with Ghostview, where it grabs the images in EPS format from disk; or convert it from postscript to PDF using Ghostscript, and it will not only grab the images in EPS format but will only include each image once, no matter how many pages it appears on it (and these are documents upwards of 20k pages long).

    Yes, I take psychotropic medicine.

  • (cs) in reply to wtijsma
    Anonymous:

    ammoQ:
    Jeff S:
    The #1 rule any programmer should know: always separate your code from your data.


    Are prolog programs data or code?
    Are Postscript, PDF and WMF data or code?

    Well, don't the latest security issues with WMF say enough? WMF,  doc/xls/ppt  documents with macro's embedded etc. etc.

    Come on, when I get an Access database/program from a customer, I have to click through 3 screens of security warnings of which at least 1 I can't turn off.

    Ok maybe these are MS leaks, but I don't know anyone that really likes working with PDF or PostScript files either. What I mean to say I hope that stuff gets replaced ASAP with file/data formats that DO separate all aspects.



    That is the big improvment of ASP.NET over  ASP; in old ASP, the code and HTML are interwoven into the same file, while in ASP.NET the HTML portion of a page and the code can be completely separated.


  • (cs) in reply to SeekerDarksteel
    SeekerDarksteel:

    About a week ago one day I was pondering the zen-ness of an .asp that modified itself.  This is close.  But to achieve ultimate zen, the core functions would have to be in the same page as products.asp.  Until then, I must go ponder...after all...what is the sound of one asp page rewriting itself?



    If no one sees the page rewriting itself... does the page truly rewrote itself?


    voodooc:
    Anonymous:
    I think I would have taken the job. It would have taken 5 minutes to write the whole array to a database and then you could junk the include file.


    Good point.  I mean, it's horribly, horribly wrong -- but it's at least consistent in its wrongness.


    Re: Dictionary; yeah, I think I played with that once.  But this is why I use hard drugs and alcohol.  To forget VBXXX.  I am a quintessential coder burn-out; I refuse to write in anything but ruby these days.


    Parent company in conference call this morning:  "How possible would it be to implement this webservice client in Java instead of Ruby?"

    Me: "Not at all."


    vc



    Amen!

  • (cs) in reply to gonchuki
    gonchuki:

    If no one sees the page rewriting itself... does the page truly rewrote itself?


    What if another page rewrites the page, is the sound a different one?

  • Your Name (unregistered) in reply to seizethedave
    seizethedave:

    I love it when people jump to call whatever set of functions they're working on "An Engine."

    /joins steve @ the bar



    I also like the way the "developer" wanted to port this "technology" to a compiled language.

  • (cs) in reply to Anonymous Coward
    Anonymous:

    Richard Nixon:
    Maurits:
    I knew arrays were evil.


    Guns don't kill people. People kill people.

    Sincerely,
    Richard Nixon

    "No - Bullets Kill People" - Sledgehammer [:P]

    Not if you drop the gun from the top of a tall building.
  • (cs)

    I have seen something similar in programs of one "good" programmer. He wrote using php something like array-to-php serializer :-). In Poland we call such type of People "skilled beast".

  • - (unregistered) in reply to Richard Nixon
    Richard Nixon:
    Maurits:
    I knew arrays were evil.


    It's not the tool - it's the person. Guns don't kill people. People kill people.

    Sincerely,
    Richard Nixon


    People with guns!

    - Freddie Mercury
  • (cs) in reply to Satanicpuppy

    Satanicpuppy:
    Anonymous:
    That's awesome.  I saw something very similar to that about a week ago in the wild during a consulting gig.  Scary that is probably very prevalent.


    I put together something like this for an e-commerce site that "couldn't afford database hosting" and "only had a few products"...Though my implementation didn't include the brillant "core" functionality, I thought it was perfectly acceptable on a small scale. The biggest drawback, of course, is performance, but I let them know that up front, and explained to them what they were going to get, and how it was going to work. Then I wrote a method that hooked my e-commerce frontend onto an array-based flat database on the backend, pocketed my check, tipped my hat, and never gave them another thought.

    They called me when the array-based datafile started throwing errors, probably about a year and a half later. I couldn't believe they were still using it...I figured at the time that either they'd succeed, and upgrade, or fail, and scrap it. I told 'em that they just had to delete a few old products, and the errors would go away, because that the code was only designed to hold a few hundred items.

    Actual quote: "But it didn't start giving us problems until we got over a thousand" Damn thing had actually held together until the quota'd drive space on their webhost gave out (was mostly the picture, not my file). Yay multiple redundancy.

    Talked 'em into going with a database, exported the junk out of the poor flat datafile, gave 'em a free upgrade to the new e-commerce package (which was the same code, tightened up, with 2 new features, and a snazzy new interface), pocketed my check, tipped my hat, and haven't heard from them since. Hopefully they'll complain to their webhost next time.

    Just goes to show, sometimes the wierd stuff you find in the field wasn't so weird, initially.

    You, sir (or Ma'am, as it may be), are a genius.

     

  • S (unregistered) in reply to SeekerDarksteel
    SeekerDarksteel:

    I dunno if you've ever messed around with VB's Scripting.Dictionary object (afaik the easiest (only?) way to do hashes in VB), but they are extremely annoying to work with.  Massive bugs can occur because you fail to use cStr around either a key or a data item.  Just last week I was having a problem where I was getting data out of the hash that I had never put in.  Worse, if I tried to use certain keys to access the data the page would error out.  It turns out that the problem was that I didn't cast the data as cStr before putting it in the dictionary.

     

    Now, I know you were probably joking about using hashes given the tell-tale "The real WTF here is...", but I just wanted to use this opportunity to bitch about hashes in VB without being entirely off-topic.

    That's the right way of doing hashes. Naturally the key is different in object oriented programming if it's int 1 or string "1". It's not the fault of the Dictionary that you assume all keys being strings without you making them so.

  • fuiru (unregistered) in reply to SeekerDarksteel

    I've done that. Well worth the effort.

  • Tom (unregistered) in reply to SeekerDarksteel
    Of course this is coming from the same person who couldn't stop laughing for 5 minutes after thinking about the idea of pcAnywhere'ing into a remote box, then pcAnywhere'ing back into my own box. Speaking of which, I need to try that sometime.

    My old roomie and I tried that, using Remote Desktop and VNC between my PC and his Mac. What happens is you get the expected "hall of mirrors" window going on. When you try to move your mouse inside the area of the remote window, it'll instantly snap it back to the top left corner. So it looks cool, but you can't do anything with it.

Leave a comment on “The Storray Engine”

Log In or post as a guest

Replying to comment #:

« Return to Article