Eat. Sleep. Code: The Computer Programming Thread, Ver. 010

there’s nothing wrong with going through recruiter companies, it’s obviously better to get hired directly but I know plenty of people who got their start through Volt or other recruiters.

So i have to make a questionary for some stuff that i think that i should ask to the candidates for the new DBA and since i am kinda lazy i want to know what kind of (serious) questions i should ask

Hm. What kind of DBA? MySQL, Oracle, or Microsoft SQL Server? There’s a few key points to each that are important, but a few general ones I can think of…

What are the ACID properties?

How would you prevent SQL injection in your coding? (This one could have quite a few answers based on the database language. Quite important, since having someone on the outside vaporizing your database is a little bad. Might not be as important to a DBA as it would be to a database developer, but still good to get an idea of what they know on it)

Our business would like to have a recovery time of (insert time here). Our database size is (insert size here). How would you go about accomplishing this? (This would test their knowledge of backup and restore procedures, and, depending on platform, how to do a piecemeal restore to get basic functionality back, then restore full functionality as fast as possible)

What would be your basic routine for checking the consistency of the database and ensuring corruption isn’t present? (Again, varies by platform, but the most basic answer would be, at minimum, to restore the latest backup to a test environment. Platform-specific checks and testing go here, too).

I could ramble on with a few more questions that could be ideal, once I know the language you’re using. These should skirt the basics for what an admin should know, though; the rest is digging into their expertise and crisis management.

Out of plain curiosity, how many of you use or have used video tutorials to learn coding? It’s been my plan to use video tutorials to learn basics so I can dive into the actual books I have without exploding into a cloud of fear pee. Now I’m thinking I should have started with books first, and consulted videos only if I was truly stuck on a subject. I can read faster than I can watch videos, and with the E-Books I’m downloading now (OCRed and all), I can copy and paste code right into a program. So, I’m thinking on switching my learning plan to that. Books primarily, with videos if I get stuck (or don’t have a book for the subject).
Have you guys ever mixed video tutorials with web tutorials/books when learning a new language? What have been your experiences?

I found a really good C# tutorial for learning how to use Forms (GUI windows). Check it out here: http://thenewboston.org/list.php?cat=15

It’s also good if you’re new to C#.

Wow. Coincidence: that’s exactly the series I just finished for C#.* I just finished a beginners one for Java from that site too.
I’m just wondering what mix of video tutorials and reading you guys use for learning a new language. I’m trying to learn as best as I can.

*BTW, just to randomly contribute SOMETHING here, I use BYTubeD to download playlists from youtube. If you have firefox, a hard drive with a lot of space, and a decent internet connection, you’re seriously missing out not using that extension in conjunction with DownThemAll. It will save you so much time if you’re downloading a bulk of videos.

Personally I’ve never been a fan of video tutorials, probably because when I was learning they weren’t really a thing. I am not big on books either, I like to use internet resources. I am also heavily against copy/pasting, I prefer to write each line along and then if it doesn’t work, I can figure out why. Copy/Pasting stuff means I’d not really understand why each thing works like it does. I ran into this recently when I was learning Objective C and doing some Restful API tutorials, I was typing things myself and running into errors, and it really taught me a lot of what mistakes I was making so I could correct them

I know books are becoming outdated, but unless what I’m looking for is real specific, I feel I prefer them for learning. There’s a decent chance they have more structure and explanation than your average set of internet tutorials. The only real problem is that thanks to torrenting, I have a metric fuck-ton of books and can’t figure out which ones are worth my time.

The problem with some books is that the code is wrong. I hate that. I suppose internet tutorials can be like that too.

With a book the odds are probably good that the author knows what they’re talking about. That doesn’t always seem to be the case with some of the stuff on the internet. (And the book probably at least had an editor.)

For really new topics I force myself to sit down and read a book; it tends to be more organized and more thorough. For touching up and filling in gaps the internet is fine. I can’t say I’ve done much with video tutorials, it seems like it wouldn’t be an at-my-own-pace kind of thing. However I do like to go see what’s on channel9 now and then. There’s a lot of fluff there but they also post some conference presentations that are really interesting–that’s also kind of my go-to for finding out about the new features in C++11 and C++14.

I have some C++ structs / classes that I need dynamic memory for. The number of instances can be anywhere from 1 to a hundred or more (possibly a lot more). Can’t decide on whether to go with vector or list as the container.

I will need to use elements in the container directly, which a vector can do, but the number of elements can start at 0 and increase with user actions. Unless I think of a starting length that’s a lot of reallocation that may happen. A list though I’d have to traverse until I get to the one that’s selected without reallocating multiple times, but I don’t know if that goes performance-wise, especially if the list is going to be as big as that.

I’m leaning toward list anyway but I’m looking for any advice / tips. I’ve never done this with C++ before. Or anything with C++.

With my first job, I just realized the ever changing IT industry.

Stupid politics, outsourcing, useless manager plague this industry lol. At least the corporate culture.

I am testing mainly at the moment and my managers don’t have clue what I am doing.

Either should be fine, it depends on what you plan to use them for. If you plan to do insertion just at the end of the object, then go with a vector. If you plan to do insertion in the middle of the objects, then possibly a List since it should be faster. If you intend to access them in order, a list is better, but random access a Vector is faster.

Without knowing more specifics of the problem, there’s no way to know which is better

It’s kind of both. Addition would be at the end (it doesn’t need to maintain a strict order in this context), but individual elements can be selected from anywhere and removed. User would be using a GUI to do this, they can add elements manually and click on the specific element to view / edit info and delete.

That’s about as specific as I can get as I haven’t decided just what I’m doing, much less know what I’m doing.

My guess would be that any difference in speed would not be noticeable from a GUI.
I’d probably use vetor by default. If you were going to use huge amounts of memory a list might be preferable, but you know, modern computers and all that.
But it probably doesn’t really matter. Pick one and go with it; come back and optimize if it turns out to be a problem. If you typedef the thing it’s probably changing one line of code to switch between the two.

EDIT: NVM, I found out I can just use a shortcut from Steam, it doesn’t have to be an exe. I was following a guide(probably an old one) that said I had to use EXEs. Everything works fine now.

Hey guys, I have a problem and would appreciate any help you guys can give me.

I’m by no means a coder, but I tried to make a batch to launch the Taito Type X BB:CS in Steam. I have been using batch2exe for other games and emulators with no problems, but for this I’m having a weird issue. Basically, type X uses 2 executables to launch the game, you have to open game.exe with typex_loader.exe. I can make batch files that do this just fine, and I can convert the batch to an exe and that works just fine. But when I add it to Steam using the add non-steam game option, it doesn’t work like it was. It doesn’t try to load game.exe with the typex_loader.exe, instead it seems to try to load the game.exe directly.

I have no clue why it would do that, and I’ve tried reworking the script many way to try and find something steam like. I don’t know if maybe it’s the batch2exe program I’m using, so if anyone can recommend something that’s supposed to better, I’m open to suggestions.

Also, the code opens xpadder and creates a loop to check to see if the game closes, so it can close xpadder when I’m done. I’m definitely not sure what I’m doing, I’ve been at this for a total of a day, so if something looks really wrong, it probably is. Here’s my code:



start /b c:\xpadder\xpadder.exe
cd "c:\blazbluecs"
"c:\blazbluecs	ypex_loader" game.exe
timeout 5
:loop
@echo off
tasklist /FI "IMAGENAME eq game.exe" 2>NUL | find /I /N "game.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
taskkill /f /im "xpadder.exe"

I’ve tried launching that directly from an exe, as well as making an exe that launches that from a separate batch, and I’ve even tried making an exe that launches that batch, and then making an exe to launch that exe. Also(if you’re curious), the timeout is really just there to give me time to think.

So with how fast things move in the tech world I’m assuming this is the layout and website?

Same with this vid. I was taken to the Oracle website for this and then this specifically when I looked for JDK7.

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Yes to both questions, though you might want to look into VS2013 to see if it integrates multiple programming languages. I don’t remember VS2010 being split up (I use 2010 Ultimate).

Note that if you decide to make Android apps, you need JDK6.

I managed to create the mod that I wanted but I’d prefer to pay someone to make any other additional changes to my site. If I’m hiring someone with php, html and CSS experience are there any questions I can ask them to test their credentials?

Just basic questions, like how long have you been coding for? Examples of their work is very useful, ask them to explain exactly what they did, any difficulties how they were overcome. Kinda like how you’d go about an interview.