While Riven was joking (or at least poking fun at how pathetic most industry interviews are) I do have some advice.
Youâll find that if the company is any any good at all, for the first simple warm-up questions you will impress them more with succinct answers. Know a relevant method in the API, a quick shortcut etc. It doesnât need to be optimised, just so long as itâs reasonable big-O.
I would first ask if Python was ok, then give
f[::-1]
A couple of days ago, I managed to get some huge improvements in NNGINEâs performance. Seriously, itâs frigging insane how much faster it got. In addition, it was really simple and just took a day to do. There were huge GPU performance improvements throughout the entire engine, especially in the G-buffer filling pass, and the memory controller load is down a lot too! A scene which could barely maintain 60 FPS is now doing a crazy 280 FPS!!!
TL;DR: [spoiler]Upgraded from one GTX 770 to two Zotac GTX 1080s, with 5 years warranty to avoid one of them breaking 2 months after the 3 year warranty ends againâŚ[/spoiler]
I havenât read anything anywhere that would give me the idea that helper methods are necessarily bad (they can be of course if you get really insignificant with them I guess). Iâm not sure if you guys use a lot of libraries in your development, but what are your opinions on helper methods? For example, to help cut down on something like this:
(Quick-probably-broken-code-examples)
Connection conn = ((DataSource)InitialContext().lookup("java:comp/env/jdbc/DatabaseNameHere")).getConnection()
PreparedStatement prep = conn.prepareStatement("SELECT * FROM table WHERE id=?;")
prep.setInt(1, 1)
ResultSet set = prep.executeQuery()
if(set.isBeforeFirst()){
while(est.next()){
//use the data
}
}
set.close()
prep.close()
conn.close()
Having helper methods that could be strung together to look like this:
getConnection()
.executeQuery("SELECT * FROM table WHERE id=?;", /*ArrayList with 1 in it*/, {set-> /* use the data */})
.close()
Inevitably the same code gets executed (and depending on how much you abstract the code, more might be executed). On the other hand, if youâre going to be making the same exact calls 200 times, thatâs less code you have to write, by a lot. And if youâre working on embedded devices thatâs a big plus too right? Thereâs also a lot less âcleanupâ (in this case) that you could forget. Part of me feels like some code like this is really helpful, but part of me feels like abstracting away something or even just âwrappingâ common code away could prove to be problematic later down the line if I ever try to go back and change the code.
Whatâs yâalls opinions on things like that? Do you do it, and if so do you have a guideline for when you allow yourself to do it or not?
Thereâs no harm in helper methods unless they reduce functionality. In mine and theagentdâs game engine, he usually writes complex systems that I in turn abstract and make helper methods for (so that you have the option of taking both routes for maximum customization). Weâve ran into a trouble a few times when I over-abstracted, but in cases like yours, I think you only stand to gain from simplifying it into function calls if youâre going to be doing it a lot.
TLDR; itâs helpful and OK, as long as it doesnât hamper performance or functionality IMO
Sorry for the delayed reply, for some reason my browser showed errors everytime I tried to reply before today.
Thanks for the tips and write up! The learning process sounds fun so Iâm looking forward to it. I actually bought a bunch of electronic stuff on eBay like servos and arduinos but Iâve not yet had time to fully dive in.
I did get a servo working on my c2 odroid mini computer using Java, and I wired up a laser pointer to an arduino programmed in their default IDE but thatâs it.
My dream is to eventually build a remote control thing of some sort. Given my inexperience with flying I think Iâll start with a wheeled vehicle first.
Thank you for your code, very interesting. It looks like you have 7 servos on the plane judging by the code, nice!
I realized that there is a game called âWonder Dogâ for Sega CD that uses the EXACT same color scheme as mine for the title. I use ROYGBIV for the colors of the letters of âDODGER DOGâ. The WIP thread title picture doesnât reflect that, but it does in the actual title of my game. lol. Has anyone ever played Wonder Dog?
I got bored programming outlines and put in some toon shading too
When Iâm done today, players should be able to grab objects and have an outline around them
@Emmsii
I created a 3d Array of Voxels that have an x,y,z. Looped through using OpenSimplexNoise to get height. Set voxels under a certain height to visible. Rotated in 3d and projected to 2d coordinates.
To get the Z ordering right i just placed a pixel on a buffered image. Voxels with a higher z placed their pixel after and on top of voxels with lower zâs. This is horribly slow but i wasnât going for performance so I used it.