School Projects



  • What do you get when you give non-programmers a real project:

    It starts in VB.NET because one of the group knows VB6. This results with a wonderfull project of globals, automatic vb casting, hungarian notation,...
    The best part was how to use a Database, they had to search for record by a date, so the easiest way is to store dates as integers, this way you take the current date 20070423, substract 31 and you can search for all records since the last month, its absoluty brilliant

    Might post some more tonight...



  • <sarcasm>lol, that date thing is awesome as if a database would have some kind of inbuilt "date functions" nothing short of brilliant </sarcasm>

    i could almost understand using int for dates *maybe* if you were storing them as a unix timestamp or something but using an integer field for what is essentially a contcatenated string seems crazy.  I'm guessing there's a lot of code to substring the first 4 digits out, then the 5th and 6th and then the 7th and 8th.  and by the sounds of the way it's been written i'm guessing there's going to be cut and pastes of it sprinkled throughout the code.  i suppose at least they used leading zeros in the date, otherwise that would have been fun.

    Just out of curiosity what's the database they are using?  Because i can't think of any that don't contain a date datatype.
     



  • @element[0] said:

    Just out of curiosity what's the database they are using?  Because i can't think of any that don't contain a date datatype.

    I'm pretty sure they didn't know about date types. 



  • So 20070101 -31
    I need the zeroeth month please...



  • @XIU said:

    What do you get when you give non-programmers a real project:

    It starts in VB.NET because one of the group *knows* VB6. This results with a wonderfull project of globals, automatic vb casting, hungarian notation,...
    The best part was how to use a Database, they had to search for record by a date, so the easiest way is to store dates as integers, this way you take the current date 20070423, substract 31 and you can search for all records since the last month, its absoluty brilliant

    Might post some more tonight...

    20070423 - 31 = 20070392

    Sir, where were you on the 92nd of March? 



  • @bstorer said:

    20070423 - 31 = 20070392

    Sir, where were you on the 92nd of March? 

    Actually it could be worse - this does work quite well as a starting point for a scan forwards.

    But show me how to get exactly 3 weeks ago?



  • They are using Microsoft SQL Server, but nobody knows anything about SQL, at all... I even showed them a page with all the DATE functions but they still insisted on using the perfect idea of using integers as dates. I showed and explained in detail how easy it was to use databinding, and let the framework handle all the database code, but they said that it wouldn't be possible.

    Going to check out tonight if they added some new stuff :)



  • Hell, I work with a production software package that uses integers as dates.  They migrated from Btrieve to MS SQL without changing the table layouts, and Btrieve is a WTF of its own in enough other respects that I suspect it was originally at fault.

     

    One of my big projects this year is supposed to be cracking the market for migrating clients off of this package entirely, and onto another one that was designed for MS SQL in the first place.




  • That's something I've been wondering, actually.  Is there any benefit to using one of the date types instead of just storing the timestamp as an INT?  The only difference I could find in the MySQL documentation is that some types will automatically format it for you when it's returned.



  • @Cap'n Steve said:

    That's something I've been wondering, actually.  Is there any benefit to using one of the date types instead of just storing the timestamp as an INT?  The only difference I could find in the MySQL documentation is that some types will automatically format it for you when it's returned.


    With TIMESTAMP column, you get to use stuff like ON UPDATE CURRENT_TIMESTAMP, so whenever any data in the row is updated, the database automatically updates the timestamp column for you (e.g. last_modified_date)

    Another benefit is being able to do certain date operations on values directly in the database, thus saving a roundtrip to the client and improving performance.  An example:

    You have a master row in a one-to-many relationship that contains a certain date you're about to go off of. The date might be Feb 15th.  You want to do an INNER JOIN from that record to another table and select the records that contain a corresponding date value that is within 1 month, but for simplicity to your users, you want "1 month" to be a calendar month, i.e. March 15th.  So you can do something like:

    SELECT * FROM master_table INNER JOIN users_table USING (some_id)
    WHERE master_table.master_timestamp + INTERVAL 1 MONTH < users.some_timestamp

    That will return to you all the records where users.some_timestamp is within one calendar month. You couldn't do that using pure unix timestamps without selecting the timestamp, processing it in your application to find out the unix timestamp that is one calendar month later, and then using it in your query.  If master_table.master_timestamp is going to be different for each row depending on the join condition, then you'd have to do processing for each row in your application.  It's a very contrived example but surely there are real world uses involving this theory; I just can't think of any.



  • The thing I've come to hate about school projects is that everyone knows that we have a limited amount of time to finish the project, and everyone wants to do the minimum amount of work possible (which isn't necessarily so bad) so instead of spending the little time we have actually working, we have hour-long meetings discussing how many corners we're going to cut.

    Somewhat ironically, I think most of the projects I've done are things that I could have done faster and better *without* the "help" of 3 or 4 other people.

    Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...



  • Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...

    So? It's accessible from throughout the world, it doesn't have a single point of failure (unless all your addresses reside at the same server) so you don't have to worry about backups, and checking in/out is as easy as checking mail. What else do you want?
     



  • @ailivac said:

    Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...

    I had one "Software Engineering" class in college.  Sadly, that's exactly what we used.  The professor either didn't know any better or didn't care, and none of us had any experience with collaborative projects.  Fortunately(?) only myself and one of the other groups members actually did most of the work, so it was easier to coordinate. 

    I sincerely hope things have changed since then... that would have been an extremely useful class if it had at all reflected real-world development processes.



  • @cconroy said:

    @ailivac said:

    Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...

    I had one "Software Engineering" class in college.  Sadly, that's exactly what we used.  The professor either didn't know any better or didn't care, and none of us had any experience with collaborative projects.  Fortunately(?) only myself and one of the other groups members actually did most of the work, so it was easier to coordinate. 

    I sincerely hope things have changed since then... that would have been an extremely useful class if it had at all reflected real-world development processes.

    my 1st year C++ professor (using Visual Studio...can't remember what version, i think 6 maybe) when showing us how to create a new project (and reaching the 'add to source control' screen), told us and I quote: "Don't worry about the SourceSafe configuration, no-one ever uses that anyways"



  • @bouk said:

    Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...

    So? It's accessible from throughout the world, it doesn't have a single point of failure (unless all your addresses reside at the same server) so you don't have to worry about backups, and checking in/out is as easy as checking mail. What else do you want?
     

    Merging? 

    A unique, globally-accessible location to retrieve information from?

     

    This post has exactly the same amount of sarcasm as that of which it quoted.



  • @RevEng said:

    @bouk said:

    Right now I'm working with people who seem to honestly believe that email is an acceptable version control system...

    So? It's accessible from throughout the world, it doesn't have a single point of failure (unless all your addresses reside at the same server) so you don't have to worry about backups, and checking in/out is as easy as checking mail. What else do you want?

    Merging? 

    There are remarkably few (approximately zero) "version control" systems that provide a merge mechanism that can seriously compare to diff and patch (not counting those which simply invoke diff/patch).

     

    A unique, globally-accessible location to retrieve information from?

    Single point of failure!



  • @asuffield said:

    There are remarkably few (approximately zero) "version control" systems that provide a merge mechanism that can seriously compare to diff and patch (not counting those which simply invoke diff/patch).

    Ummm... SVN seems to do a pretty good job for us in that regard. It's handled some pretty complex merge operations without human intervention, too .



  • @KenW said:

    @asuffield said:

    There are remarkably few (approximately zero) "version control" systems that provide a merge mechanism that can seriously compare to diff and patch (not counting those which simply invoke diff/patch).

    Ummm... SVN seems to do a pretty good job for us in that regard. It's handled some pretty complex merge operations without human intervention, too .

    SVN is nice in that it can be configured to use any external diff, merge, or 3-way program as well. My choice is kdiff because I'm cheap, but there are far better commercial ones out there as well. The default is very similar to the standard gnu diff/patch though.



  • @KenW said:

    @asuffield said:

    There are remarkably few (approximately zero) "version control" systems that provide a merge mechanism that can seriously compare to diff and patch (not counting those which simply invoke diff/patch).

    Ummm... SVN seems to do a pretty good job for us in that regard. It's handled some pretty complex merge operations without human intervention, too .

    It contains nothing but a limited clone of diff and patch. (Quite why they don't just use the real diff and patch is not clear, particularly since it will use the real diff and patch if you tell it to)

    I can only presume that you have never performed complex merges with diff/patch. It's much the same, only more flexible and more susceptible to automation.



  • I always hated group assignments in high school. No one ever did anything that contributed to the project. Yet, my grade depended on them. The teachers wouldn't do anything about it, either. Sometimes I got a C because it was impossible for me to complete all of it in time. However, a C is pretty good for everyone else considering they didn't have to do anything.

    I haven't been to college, so I don't know how that goes. At least here at work, my supervisor takes me very seriously, so my input into projects is usually followed due to mandates. Plus, I've managed to get the respect of one of the other developers. We team up and override others. I even managed to cause our office's Engineering department to rebel against the head supervisor located in the corporate office. xD



  • @AbbydonKrafts said:

    I always hated group assignments in high school. No one ever did anything that contributed to the project. Yet, my grade depended on them. The teachers wouldn't do anything about it, either. Sometimes I got a C because it was impossible for me to complete all of it in time. However, a C is pretty good for everyone else considering they didn't have to do anything.

    I haven't been to college, so I don't know how that goes. At least here at work, my supervisor takes me very seriously, so my input into projects is usually followed due to mandates. Plus, I've managed to get the respect of one of the other developers. We team up and override others. I even managed to cause our office's Engineering department to rebel against the head supervisor located in the corporate office. xD

    It's the same at Uni. There are peer evaluation forms, so you can rank people according to their effort, and weight the marks awarded - however, this still doesn't spare you from the frustration of taking on a four-person project by yourself, or even worse, trying to work with the group but ending up so hindered by inefficiency, bad team dynamics and bad communication that you produce almost nothing of value.

    I'm just a little scared that I'll wander out into a job, and it'll be just the same, or even worse. At least in Uni, group projects only last six months or so. 


Log in to reply