|
Journaling
|
# ? Nov 9, 2012 08:14 |
|
|
# ? May 29, 2024 20:16 |
|
oRenj9 posted:So, I just finished writing a "file system" as part of my Operating Systems class. This was actually the funnest project I've had in school. I enjoyed working with the bits and bytes so much that I completed it in two days, rather than the allotted two weeks. You may find the following book useful: Practical File System Design with the Be File System (is out of print and the author has put a copy online). http://www.nobius.org/~dbg/practical-file-system-design.pdf
|
# ? Nov 9, 2012 12:06 |
|
tef posted:You may find the following book useful: This is exactly what I was hoping to get, thank you so much.
|
# ? Nov 9, 2012 19:57 |
|
Kids, make sure you properly clamp values before converting it from doubles down to shorts. I just spent 1.5 hours picking a bunch of math apart, wondering why it put out batshit insane waveforms, even tho this should have been impossible. Problem happened in a completely different piece of code.
|
# ? Nov 10, 2012 02:48 |
|
I'm a relatively new programmer, and I'm trying to do Perlin noise but I'm having a hard time finding a tutorial or guide on how it works and how to implement it. Every guide or thing I find is just HERES THE CODE AND WHAT YOU CALL TO GET SOME NOISE! Do I even need to understand how it works, or should I just be basically copying the code?
|
# ? Nov 10, 2012 07:16 |
|
Shadaez posted:I'm a relatively new programmer, and I'm trying to do Perlin noise but I'm having a hard time finding a tutorial or guide on how it works and how to implement it. Every guide or thing I find is just HERES THE CODE AND WHAT YOU CALL TO GET SOME NOISE! As with most things, you can either find complex algorithms with near-no explanations, or a basic explanation with no code/algorithms. I tend to prefer the second since it gives me a bit of a logic puzzle in how to code it anyway. Here's a good one to do with perlin noise, I didn't really use the code here at all, just the ideas behind it. http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
|
# ? Nov 10, 2012 07:18 |
|
Jewel posted:As with most things, you can either find complex algorithms with near-no explanations, or a basic explanation with no code/algorithms. I found this, too, but some dude on Wikipedia claims it's not really perlin noise? http://en.wikipedia.org/wiki/Value_noise
|
# ? Nov 10, 2012 07:30 |
|
Shadaez posted:I found this, too, but some dude on Wikipedia claims it's not really perlin noise? Whatevverrr, it looks fine and fits what you wanna do. It's less a case of "that's not perlin noise" and more a case of "what I wanted isn't perlin noise in the first place, it's whatever that is".
|
# ? Nov 10, 2012 07:37 |
|
Almost everything you'll find online about "Perlin Noise" is actually just "Value Noise". Perlin noise has useful properties for procedural generation including consistent feature sizes and a continuous first derivative (handy for displacement maps). Read this to understand the math: http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html Once you understand how a single point is derived, the example code should be readable. http://www.mrl.nyu.edu/~perlin/doc/oscar.html#noise Simplex Noise is pretty neat too. It's isotropic (there aren't noticeable horizontal/vertical biases) and is better for higher dimensions (O(N^2) vs O(2^N)). http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
|
# ? Nov 10, 2012 10:19 |
|
I'm fine with that, but I'm unsure of how to do the octaves trick (and thus making real fractal noise) with real Perlin noise.
|
# ? Nov 10, 2012 16:36 |
|
I feel like this is a really dumb question, but how does one release their code for a project without including important credentials? For example, I wanna throw up a web project I working on onto github without my database login information. I'm not sure what the best way to do this is. I can think of a couple solutions but they're kind of ugly.
|
# ? Nov 12, 2012 14:25 |
|
etcetera08 posted:I feel like this is a really dumb question, but how does one release their code for a project without including important credentials? For example, I wanna throw up a web project I working on onto github without my database login information. I'm not sure what the best way to do this is. I can think of a couple solutions but they're kind of ugly. Have a CFG file dictate the login info? Don't upload your one but give a template one and point out they need to add their own info? Edit: vvv Oh! Rad! I like to try and answer questions like this in ways that seem logical to me, not ways I've read about (in this case I'd never thought about this problem before). It helps get me a good mindset of how things work without following the mentality of "I was told to do this, this is what I should do". If I'm wrong then other people usually correct me and I learn something still! Always a good way to go about it imo. Answering peoples' questions is one of the best ways to learn aside from actually doing it yourself. Jewel fucked around with this message at 15:23 on Nov 12, 2012 |
# ? Nov 12, 2012 14:29 |
|
etcetera08 posted:I feel like this is a really dumb question, but how does one release their code for a project without including important credentials? For example, I wanna throw up a web project I working on onto github without my database login information. I'm not sure what the best way to do this is. I can think of a couple solutions but they're kind of ugly. If you're looking at this from a version control angle, a common way to do it is to have an regular config file that is full of default or example values checked into source control and a second 'site' config file that is not checked in which contains any sensitive bits. Your software then looks at both and has the 'site' config file override the real one in the case of differences.
|
# ? Nov 12, 2012 15:19 |
|
How does memory virtualization work with Intel VMX? My understanding is that with EPT the guest can do whatever it wants with CR3, and then the EPT steps in and translates the guest-physical address to a host physical, but what do you do if you don't have EPT available?
|
# ? Nov 13, 2012 05:12 |
|
Is there a thread with some discussion of CUDA in it, and/or does anyone have any informed opinions about it. I have a problem i'm working on where my time-limiting step is inverting a very large non-sparse matrix (not directly, but it's a generalized eigenvalue problem, so i'm effectively doing that, and I need all the eigenvalues). I'm currently using the Intel compiler, and their implementation of the LAPACK routines for this, and it's reasonably fast, but if I want it to execute in real-time while I take data then I need about an order of magnitude speed increase. Will CUDA on a reasonable videocard help this?
|
# ? Nov 13, 2012 05:49 |
|
yaoi prophet posted:How does memory virtualization work with Intel VMX? My understanding is that with EPT the guest can do whatever it wants with CR3, and then the EPT steps in and translates the guest-physical address to a host physical, but what do you do if you don't have EPT available? Trap it and do it in software. There's a VMware whitepaper that compares shadow page tables to EPT.
|
# ? Nov 13, 2012 07:21 |
|
Otto Skorzeny posted:If you're looking at this from a version control angle, a common way to do it is to have an regular config file that is full of default or example values checked into source control and a second 'site' config file that is not checked in which contains any sensitive bits. Your software then looks at both and has the 'site' config file override the real one in the case of differences. Make sure you add the sensitive config file to .{git,svn,hg}ignore as well.
|
# ? Nov 13, 2012 08:15 |
|
JawnV6 posted:Trap it and do it in software. There's a VMware whitepaper that compares shadow page tables to EPT. So basically you trap any access to CR3, page directories, and page tables, and tell the guest what it 'thinks' it should get for each of those, then set up your real page table the right way? In that case, when the guest goes to read the physical page corresponding to 0x1234, it'll use whatever's actually stored in CR3 (which the host sets up). Which means that each guest and the host have to have different page tables because 0x1234 in the guest isn't going to be the same machine page as 0x1234 in the host, correct?
|
# ? Nov 13, 2012 09:52 |
|
Essentially yeah, the host maintains its own page tables separate from the guest OS. When the guest OS updates its page tables in any way, the host makes a corresponding change to the "real" page tables so they keep matching. When the guest OS maps virtual address A to point to physical address B. That gets trapped by the virtualization layer, which then updates the "real" page tables to point that virtual address A to the actual memory behind what the guest thinks of as physical address B.
|
# ? Nov 13, 2012 10:55 |
|
Otto Skorzeny posted:If you're looking at this from a version control angle, a common way to do it is to have an regular config file that is full of default or example values checked into source control and a second 'site' config file that is not checked in which contains any sensitive bits. Your software then looks at both and has the 'site' config file override the real one in the case of differences. Makes sense, thanks!
|
# ? Nov 13, 2012 11:34 |
|
etcetera08 posted:I feel like this is a really dumb question, but how does one release their code for a project without including important credentials? For example, I wanna throw up a web project I working on onto github without my database login information. I'm not sure what the best way to do this is. I can think of a couple solutions but they're kind of ugly.
|
# ? Nov 14, 2012 05:00 |
|
I'm working on a green fields project with developers I respect, who think that the following is a good way to represent reference data in an RDBMScode:
There are tens of reference data entities, each containing up to hundreds of rows (never into the thousands). They don't feel they can trust the code column to be immutable since it has to match a column that's controlled by another system (even though they're comfortable basing SQL joins on that same column, and it's always unique in the master system) and they're not comfortable collapsing all those IS_THING_* columns into a single field that references an enum or table of known codes or anything else I could think of to suggest, even though we have absolute control all of those columns and no other system cares about them (or knows they exist) at all. I'm pretty sure this is the second worst idea I've seen in real life, but I can't convince my colleagues. They're not bad developers and they're way better than this, and I'm really not sure why I can't explain to them why this is a really bad design. So I guess my question is: Am I wrong? And if not then what else should I do to convince these people? Because at the moment I'm pretty sure I'd rather look for another job than have my name attached to this mess.
|
# ? Nov 14, 2012 10:31 |
|
Goat Bastard posted:I'm working on a green fields project with developers I respect, who think that the following is a good way to represent reference data in an RDBMS What do I think? I think that the coding horror thread is over here because that's what you have.
|
# ? Nov 14, 2012 15:14 |
|
This is a strange question. It has to do less with programming and more with your mental state as a result of programming. I'm fairly new to this and lately I've been doing a lot of JavaScript and PHP coding at home in my spare time. When I code, I find myself absolutely immersed in it. We're talking trance-like, full mental attention. I'm sure that's normal. But I also find myself frustrated if I'm struggling with a particular problem and I'm unable to solve it before the day is over or I have to quit for whatever reason. I mean, VERY frustrated, like I can barely get on my with my day/evening, and I can't get my mind off of it to save my life. I'm uncommunicative and pissy with people for at least a couple hours. I just can't shake that relentless nagging feeling that I just HAVE to figure it out, and until I do nothing else matters. My question: First, do you all experience this? And if so, how do you deal with it? Is this just a symptom of being a coding newbie? Am I just too wrapped up in it? Is smoking pot the solution?
|
# ? Nov 14, 2012 16:16 |
|
caiman posted:This is a strange question. It has to do less with programming and more with your mental state as a result of programming. I'm fairly new to this and lately I've been doing a lot of JavaScript and PHP coding at home in my spare time. When I code, I find myself absolutely immersed in it. We're talking trance-like, full mental attention. I'm sure that's normal. But I also find myself frustrated if I'm struggling with a particular problem and I'm unable to solve it before the day is over or I have to quit for whatever reason. I mean, VERY frustrated, like I can barely get on my with my day/evening, and I can't get my mind off of it to save my life. I'm uncommunicative and pissy with people for at least a couple hours. I just can't shake that relentless nagging feeling that I just HAVE to figure it out, and until I do nothing else matters. I don't get pissy at people, but unsolved problems will just kinda bounce around in my head for the rest of the day and while I sleep. More than once I've turned the car around leaving from work because the solution (or an idea) finally hits me on the drive home and I want to give it a try before it leaves my head. Sounds like you just need to move to WA or CO and smoke a bowl after hitting a roadblock, and let the solution come to you
|
# ? Nov 14, 2012 16:23 |
|
movax posted:I don't get pissy at people, but unsolved problems will just kinda bounce around in my head for the rest of the day and while I sleep. More than once I've turned the car around leaving from work because the solution (or an idea) finally hits me on the drive home and I want to give it a try before it leaves my head. I've woken up in the middle of the night and whiteboarded a solution to something that I couldn't figure out before. It's weird, I'm really obsessive about some things and I'm glad that it turned into a kinda-plus for this line of work.
|
# ? Nov 14, 2012 16:27 |
|
This isn't programming necessarily, but would it be 'kosher' if I were to use my work laptop for free lance development? There's some pretty handy, pretty expensive tools we use for publishing updates and some packages of more fancy windows forms controls and stuff that I'd love to be able to use. I suppose it depends on my boss and the actual license of the software, but has anyone done it?
|
# ? Nov 14, 2012 16:43 |
|
Our issue tracker has three classes of issues: Bugs, Features, Tasks. Bugs are bugs, Features are things which provide tangible benefit to end users, and Tasks are everything else. Bugs are annoying, frustrating, something you or someone else has written which is not behaving as expected, and you need to figure out why. Features are fun (generally), you get to build something new, satisfy a want. Tasks could go either way, but are generally neutral: refactoring, maintenance, house keeping, generally intangible to the end user. To combat what you're describing, I usually have one of each on my plate, and throughout my day I switch between them. Keeps me sane, and sometimes you just need a break from a problem to see it with fresh eyes an hour later.
|
# ? Nov 14, 2012 16:43 |
|
Sab669 posted:This isn't programming necessarily, but would it be 'kosher' if I were to use my work laptop for free lance development? There's some pretty handy, pretty expensive tools we use for publishing updates and some packages of more fancy windows forms controls and stuff that I'd love to be able to use. I suppose it depends on my boss and the actual license of the software, but has anyone done it? It depends. I've seen contracts that say that things created on a work-provided machine are owned by your employer, so check that out. Also it's probably a good idea to talk it over with your boss and get it in writing beforehand to avoid any ugliness, especially if the thing you want to create can be related to what you work with in any way.
|
# ? Nov 14, 2012 16:46 |
|
Sab669 posted:This isn't programming necessarily, but would it be 'kosher' if I were to use my work laptop for free lance development? There's some pretty handy, pretty expensive tools we use for publishing updates and some packages of more fancy windows forms controls and stuff that I'd love to be able to use. I suppose it depends on my boss and the actual license of the software, but has anyone done it? The agreements you signed when you started your job very likely say that you can't do this, and that they're within their rights to fire you if you do.
|
# ? Nov 14, 2012 16:47 |
|
I guess I should probably mention I work at a tiny software shop (6 other people) and there was no legal mumbo-jumbo for me to sign when I was brought on. I'd of course run it by my boss if anything were to come to fruition from this idea.
|
# ? Nov 14, 2012 16:51 |
|
Talk to your boss before you even begin, and get it in writing. It may sound excessive if you're all friends and a small shop, but there's no reason not to.
|
# ? Nov 14, 2012 17:00 |
|
So I'm absolutely confused on this homework problem I have with binary trees, and my professor is reluctant to help me because the only way to really help me is to give me the answer. The question is something like this: Draw a binary search tree whose right subtree has 3/4 of the elements as the left subtree, and has exactly 4 internal nodes and 4 leaf nodes. The problem I'm having is that I'm physically unable to satisfy the ratio requirement while having the correct number of internal and leaf nodes. So without asking for straight-up answers, as that wouldn't teach me anything, I do have a few questions: When he specifies left subtree and right subtree, does the node count on that include the BST's root node? I've tried it both ways and I'm physically unable to keep the ratio and numbers to his specifications. Based on the definition of an internal node, would you think the root node counts? I don't think so myself, but maybe someone with more data structure knowledge can correct me. Of course, here's the closest I can get: I have, to my knowledge, 4 leaf nodes, 3 internal nodes, and the correct ratio in this tree. Unless anyone can shed some knowledge on it. I know how to insert numbers in the BST so I don't need help with that, but I don't want to start plopping numbers into it until I have the correct structure.
|
# ? Nov 14, 2012 17:17 |
I don't see why the root node shouldn't count as an internal node. It's not a leaf, ergo it must be internal.
|
|
# ? Nov 14, 2012 18:16 |
|
nielsm posted:I don't see why the root node shouldn't count as an internal node. It's not a leaf, ergo it must be internal. That's what I thought, it meets the definition of an internal node perfectly fine. Some references disagree with that but I think if the root counts as internal, my tree diagram is a correct answer to the problem. E: Yeah, looking at previous lecture notes, my professor counts the root as internal. I'm not sure if it's correct, but it satisfies the question just fine. Thanks! Macichne Leainig fucked around with this message at 18:42 on Nov 14, 2012 |
# ? Nov 14, 2012 18:25 |
|
Hughlander posted:What do I think? I think that the coding horror thread is over here because that's what you have. Yea, that's what I figured. First time I've seen one happen in front of me and been powerless to stop it. Oh well, I guess I keep trying while I look for new work.
|
# ? Nov 14, 2012 20:48 |
|
So, here's a question. Is there any kind of implementation of XDebug that doesn't suck? I spent hours trying to get it to work with Netbeans and still couldn't get it. I've got it working with PhpStorm but the actual IDE is kind of awful. All I want is to be able to set breakpoints and stop execution so I can check variable status. Shouldn't be too hard, right?
|
# ? Nov 14, 2012 21:14 |
|
Have you configured Apache and PHP to work with Xdebug yet? Does it work at all? Netbeans itself probably isn't the issue.
|
# ? Nov 14, 2012 21:17 |
|
Somewhat related to that last question about the database... What's a good book I can read about database/table design? And something on Postgres would be great, too. We have three or four programmers and occasionally we make programs that call for databases but none of us really know anything about good database design, so I KNOW that our poo poo is ugly and inefficient. I'd like to make this an opportunity to learn. Where should I start? I prefer books because it's easier for me to go off in a side office and read than it is to sit online and not get distracted by other sites/projects/e-mails/requests.
|
# ? Nov 14, 2012 21:33 |
|
|
# ? May 29, 2024 20:16 |
|
rt4 posted:Have you configured Apache and PHP to work with Xdebug yet? Does it work at all? Netbeans itself probably isn't the issue. Yes, I have. Like I said, I've been able to get it to work with PhpStorm, just not NetBeans. Either way, the larger question still stands. Is there anything better out there than Xdebug?
|
# ? Nov 14, 2012 21:36 |