- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
What is it that all you "skilled programmers having no experience with databases" are working on? What kind of code are you writing, that doesn't access a database? Games, or something?
Admin
Admin
Our GUI developers know SQL, but I wouldn't think of turning them loose without some of the back-end folks checking it. Conversely, I'm a back-end person, and have written my share of GUIs, but I can't design, let alone draw/render something that looks even remotely professional. Also, I can muddle my way through fairly complex queries, but routinely go to one of our DB folks and ask them to redo my queries to make them better.
Context is everything.
Admin
Really big government projects that will never get finished and each person can only work on one tiny part of it.
Admin
Admin
The funny thing is one good developer could do all those people's jobs quicker because of all the time wasted in arguing and communicating what needs to be done.
Admin
The real WTF here is that some jackass agreed to interview a 20 year old (probably not even graduated from college yet)
And zeke, in response to this:
Please review the following: xkcdAdmin
Admin
Try office applications. A word processor has no reason to talk to a database (except for mail merges, which is not my problem). I did write a data collecting program once, about ten years ago. It did not use a database because it was intended as a consumer product, so it just saved the data in a file. It did have to talk to a server to share the data, but the server was also something I wrote myself, and it worked more like rsync than a database.
Even now when I have data, I am far more likely to just design a file format for it and stick to it than use a database. I want to make software for regular people, to use on their personal computers, and regular people don't have a database server running. They have no interest in administering it or in transaction safety (since they are the only ones using it), and would have trouble understanding why data has to be stored in some central location and in a whole directory instead of a single file. Frankly, I have trouble understanding that myself. I am sure there are good reasons for it, I just don't know what they are.
The reason there is so much database use is that most applications are developed for business use; inventory control and the like, where databases are a perfect fit. I find it troubling that there aren't more consumer programs that let people use the computer for something other than games. Other than Microsoft Office and a web browser (and games, of course) there is almost nothing out there.
Admin
I didn't finish my thought... what I meant to say was that interviewing a newbie programmer (obviously she seems a bit below average even for a newb, but that could have been nerves) for a position that obviously requires some experience is the WTF. Probably some headhunter firm firing resumes at this company and hoping something sticks.
Admin
I've never know anyone to hire a architect or a DBA. Designing the database is almost always left to the developer. For that matter, the developer is often required to know Photoshop and create the company's web site design. I've even been asked to do marketing because SEO is too technical for anyone but the developer.
Admin
Admin
You beat me to saying that someone beat me to it. This is classical inside the box thinking. What's wrong with that, anyway? No one can think outside the box all of the time unless maybe (s)he's a lunatic. Sometimes the simple and well-tested solution happens to be the best, so: Think inside the box!
Admin
The problem is that there's no standard DB-centric way to prevent two or more flags from being set to "right" at the same time.
Yes, you could do it with triggers or stored procedures, but those are hardly standard (the concept is, but not the implementation) and they aren't really part of the data model per se anyway.
Admin
Applications that are based around storing/retrieving large amounts of information are only one set. There's a lot of other types out there.
Consider the majority of embedded applications for instance...
Admin
Ugh! I studied CS because I find things like games, 3d graphics, artificial intelligence, compilers, and operating systems interesting. It totally sucks that, after I graduated, I am just now finding out that 99% of software development jobs is just an enterprisy - "collect data, filter it, organize it, display it" business. I should have just stayed at uni.
Admin
Let me guess... the reason that they never get finished is that people are trying to reinvent a DBMS so they don't have to use any of the existing, well-tested implementations?
Bogus reason #1: Embeddable DBMSes like Berkely or Firebird do not require a database server.
Bogus reason #2: When using embedded Firebird, for example, you can put the entire database in one file.
I used embedded Firebird with the ADO.NET provider for a program that generated single file databases (and one to access them). It was a snap. Designing my own filesystem and the necessary access routines would have been a lot more trouble.
Admin
Can't you find a position with a games or 3D or AI company? I haven't tried, but I had the impression there were plenty of them out there.
Admin
Admin
I once gave the technical part of a phone interview with me and a coworker on our side, and the candidate on speakerphone. The candidate had just got his masters in computer science so we asked questions related to his school work. After trying to tease out any detail at all, the straw that broke the camel's back was this:
At that point, my coworker wisely muted the phone cause we were both losing it.
Admin
DAMN YOU!!! Reading this and looking at some of the answers made me think : "Yes, but would that allow them to generate SCORM compliant output compatible with the latest IMS Question and Test Specifications"?
Yes, I am a dably babbaged individual.
Admin
Oh and PS : I'd actually answer that the use of a database is probably inappropriate and you should really use one of the multitude of SCORM compliant quiz generators so that this stuff could go in the profs LMS.
That said, you've now got me wondering if I can do this with a DTD or whether I'd need to use XSD/Relax NG.... :/
Admin
You seem to conveniently ignore existence of embedded databases (say SQLite). The "regular people" argument doesn't hold any water - I have one shipping application used by "regular people" and it uses an SQLite database. It made things much easier - it originally used a text file to store the data. The file had to be read each time on startup, the parser had to be maintained, etc. The database reduced the code size by 2-3klocs and made the code more robust too.
Yeah, because computers never crash, and you never ever have to Undo anything.
A good embedded database will use a single file.
Somebody has spent tons of time debugging the database. At the time I abandoned the plain-text file, the parser still had known bugs which had no easy workarounds (luckily they didn't affect any users).
How's that different from managing an address book, a list of software packages, or a list of files in software packages? SQLite databases are routinely used in Linux package distribution via yum - the software downloads bzipped sqlite file, and can then do very efficient queries on dependencies, files, etc.
What hole do you live in??
"Consumers" routinely use software like photo editing and media managment/editing in general, even computation (students!). Just two examples in non-business setting. Go to local computer store (that's not BestBuy to you) and see what software is on the shelves. Games are <50%.
Cheers!
Admin
This is why I tell CS students to take the time to learn and understand databases and SQL. This immediately gives them the upper hand in the competition for entry level development jobs. I'm still surprised at how little education about databases there is at the undergrad level.
Admin
You mean "existing, godawfully bloated, poorly designed, and hard to use with C++" implementations? I agree that MySQL certainly has a place, but not for everything. A typical desktop application does not need all those fancy features a database provides, making them little more than bloat and inconvenience. For example, a typical desktop application will have the following differences:
Single user access. Nobody messes with your data but you, and nobody connects to it while you are working on it. This makes concurrency control unnecessary, scalability pointless, and transaction control useless.
Small data set. Regular people are not Fortune 500 companies and don't have terabytes of data. Most data sets are a few megabytes in size, if that. This means that all those painstaking query optimizations will not help much.
Offline. Most people don't have broadband at home. If your database server is inaccessible, the app is unusable, which is very very bad. A git-like full clone solution is a far better choice for distributed data sets in this scenario.
Run their own backups. When I want to back up a file, I want to back up a file, not a goddamn directory in some cryptically named location. I might even want to attach it to an email. Remember, small data sets!
5.Don't have a DBA degree. And consequently not willing to spend time on weird administration tasks that require connecting to a shell-like SQL interface. (Or at least that's what all the tutorials I've read do. What's with the goddamn text, people? This isn't 1976; we have GUIs these days! Or are you too cheap to make one?)
IMHO, MySQL is simply not a good idea in this situation. It's the wrong tool for this job.
True, but they don't provide any benefits over the simple dump-my-data-and-index solution. They are actually worse, since they have C interfaces, which will defile your pure C++ design. There is NO excuse for using plain C interfaces these days. Good design requires structure, and C can't provide any.
It's not a bogus reason if I haven't heard of some obscure package that allows one-file operation. Most other programmers will not have heard of it either.In a single user scenario you don't need a filesystem. You just write your data as you have it in memory, in an vector or something, into a file. Writing serialization routines is not that hard. If you care about memory usage, you might implement a sliding window backend, which isn't very hard either, but in most cases you don't need one.
Once again, I am not disputing the need for MySQL in a huge company with terabytes of data. There you have concurrency issues, scalability issues, security problems, query performance, and all that. However, for an end-user application this is all unnecessary.
Admin
The point is while there's more than one way to skin a cat, as long as you are consistent within your chosen method, and don't start with a live cat, you have a chance of success.
Aside: on interviews, sometimes a nervous (but competant) person might blank out on an otherwise reasonably simple question, if it catches them off guard. Honestly, when was the last time someone came up to you at work and said "design xxx and give me a working model in the next 2 minutes"?
Admin
VB? How is that enterprisy?
Admin
It allows for more than one correct answer per question as well as no correct answers.
Admin
Admin
Most user applications don't support undo over a restart. I don't see that as a limitation. And as for handling crashes, the most common way is to write out a temp file and then move it over the original. Regular people don't have terabytes of data and this temporary waste of space is not an issue.
1. Don't use goddamn text formats. 2. Don't use goddamn text formats. 3. Sometimes you need to reinvent the wheel because you are making a bicycle instead of a race car.The data set is small, so you don't need fancy features. Yes, of course you can use SQLite, but you can also use a sledgehammer to drive in nails.
Yes, do go. And then count the ones that are actually new. Most have been around since the 90s and are simply being maintained with pointless improvements. IMO, most of these new versions are much worse than the old ones. For example, I prefer Microsoft Photo Editor to Photoshop. I also can't use the current financial software due to the goddamn "web look" with razor-to-the-eye unchangeable white backgrounds. And where is my Norton Utilities? Or a decent defragmenter that can compact that FAT32 partition I have to keep to share files with Linux? Or a word processor where I can permanently get rid of that stupid WYSIWYG lets-show-the-user-a-page-like-paper look? Or a music player that doesn't try to look like a physical stereo, faking perfectly good system controls with pseudo-knobs and buttons? Such garbage!Admin
Admin
Little late don't you think?
Anyway, as they told her, you don't need to give an explicit answer, just start a process of problem resolution with them, ask questions and design on responses, maybe even them don't know what they're asking since this is supposed to be a hypothetical question.
Do some pseudo-uml drawings, some pseudo-code and give an enterprisy answer... am I hired?
Admin
Admin
Or my personal favorite
Idiot: You're good with computers. Right? Me: I'm a DBA and a software developer. Idiot: Great! So that means you know how to use Photoshop. Hey, I need you to design a cool looking poster for my department's product launch party. Me: How is it you manage to earn a paycheck at this place?
Admin
Look at the bright side... if the professor doesn't pay you, you can hack the app, switch all the answers to false and watch the students organize a lynch mob.
Admin
Im not a DBA either, not even CS grad yet. But here's my attempt (they hammered me with 3NF, so bear with me :p)
TBL 1: Index (Auto Increment, Unique) |Question (Unique) - All fields req.
TBL 2: Index (Auto Incr, Unique), AssociateQ (Unique, Asociated to the index of the corresponding question), Right Answer - All fields req.
TBL 3: Index (Auto Incr, Unique), AssociateQ (Asociated to the index of the corresponding question), Wrong Answer - All fields req.
It allows for only one right answer in the right answers table, yet any number of wrong answers in Table 3.
Admin
Admin
Admin
Yes, but you could risk having no right answers at all. You need that correct answer in the same table as the question.
Admin
I'd say you passed this.
While others may say you now need three fields to hold one field of data (right answer) as opposed to the previous answer using only two tables with the right answer listed in the question table, your solution allows for future changes to be easily made when the inevitable scope change happens to allow for more than one right answer.
Your solution does lead itself to questions without answers though. The previous allowed questions with no wrong ones listed but you always need a right one. Issues like these are best addressed in the business logic in certain systems and not at the DB level.
Sometimes thinking about the future leads you nearly back to the "in the box" solution because of scalability or ease of maintenance.
Admin
I think she came to see us afterwards...
We went through a mass interview process a few months ago for a total of 6 people. There are some REAL interesting candidates on the market - people that have spent WAY too much time adding buzzwords to their rezzy.
Sigh...
Admin
At my university as an undergrad, the professors were too busy having an orgy with their algorithms analysis to tell us of the real world importance of such things. Professors teaching CS are focusing on things like teaching the Church-Turing thesis. Fine. But to get a job after getting the degree, we'll need to know something else.
Towards the end of my schooling I noticed there were lots of local businesses trying to hire CS students to build them some custom database apps to handle simple things specific to their business. At that time I knew Access enough to build the databases and the front ends. That alone was more meaningful to my wallet than the Pumping Lemma.
You need to know both the CS type fundamentals as well as some practical skills to pay the bills. If only professors reminded their students of that. Then again, none of what I get paid for I learned specifically at school. It gave me the fundamentals, but the specific languages and whatnot were all self taught.
Admin
The sad thing is both have their appropriate uses, but knowing where and when to appropriately apply them is lost on most people.
Admin
If Microsoft ever bothers to respond to all the resumes I've sent them, I might get a few stories to submit. I don't get it... the job I'm applied for is practically the exact same thing as my last job, so my resume should at least merit a phone screening.
I think I pissed off one of their recruiters when I was in college. They're not the vengeful sort of company that blacklists people for trivial stuff from years ago, are they?
Admin
If you used a Multivalue database, you could so it all in one table. LDAP db could do the same thing.
Admin
While referential integrity is probably best implemented at lower levels, stored procs can be used for that purpose. Is it ideal? No. Is it best? No. However, when interviewing, folks don't always come up with the best solution off the top of their head. IMHO, I find you get a better read of someone's abilities if you see how they think it through, rather than focusing on the quality (within reason) of their solution. Remember, you have asked this question before and have had the opportunity to think it through; the candidate is likely hearing it for the first time.
Admin
There is a very good solution for that: http://www.fs-driver.org/
Admin
According to the FAQ, that driver does not support access rights, which means that any application will be able to write anywhere in my Linux fs tree. That is unacceptable. I don't trust Windows applications and mostly just boot there to play games, fill in pdfs (as in tax forms), run uTorrent, and perform other sundry tasks that Linux doesn't do yet. Anything shared between the two must be isolated and totally non-critical.
Admin
Used to work on machine vision: math, no databases.
Used to work on physical simulations: math, no databases.
Work on 3D modelling software now: math, no databases.
Admin
So I will continue in this style, until they stop me, or have some questions ....
Remember - it is not so, that you have to write this application from scratch to the end on interview ... this is, that you should prove, that you know how to do such things ... they probabelly do not need such app at all and maybe they have only one boss and request are made simply by asking, but this is example problem and solution is to start solving it ... nothing more ...