Search found 382 matches

by Sagekilla
Tue Sep 04, 2012 10:51 pm UTC
Forum: Coding
Topic: A tale of long forgotten code.
Replies: 8
Views: 3634

Re: A tale of long forgotten code.

I agree 100% with what sourmilk and Yakk said. The only thing I have to add on top is that you shouldn't think of refactoring as "rewriting something I already wrote." Writing a program for the first time is sort of like inventing the plane for the first time. When you refactor it, it's li...
by Sagekilla
Mon Aug 27, 2012 12:26 am UTC
Forum: Science
Topic: Let's say I have a puncture in the ISS..
Replies: 3
Views: 1817

Re: Let's say I have a puncture in the ISS..

elasto wrote:snip


Awesome thanks! That was exactly what I was looking for.

Also, apparently Firefox says I've visited this website before. I have no idea when that was.
by Sagekilla
Sun Aug 26, 2012 8:02 pm UTC
Forum: Science
Topic: Let's say I have a puncture in the ISS..
Replies: 3
Views: 1817

Let's say I have a puncture in the ISS..

So pretend for a second that I have a sphere of radius R floating out in space with air at 1 atmosphere of pressure on the interior. If I were to cleanly puncture the sphere such that I had a small hole of radius r, how could I calculate the speed of the air that's escaping the sphere? I ask because...
by Sagekilla
Sun Aug 26, 2012 7:44 pm UTC
Forum: Coding
Topic: Efficient calculation of gravity between many objects.
Replies: 6
Views: 3289

Re: Efficient calculation of gravity between many objects.

Awesome answer, Sagepost. I read into all the links you posted. The Fast Multipole Method does indeed sound pretty advanced, the Barnes-Hut Method should do fine. ;) I've been working on this for the better part of 4 years, from the very beginning of my time at my Uni up until now. There's -loads- ...
by Sagekilla
Sun Aug 26, 2012 5:55 pm UTC
Forum: Coding
Topic: Efficient calculation of gravity between many objects.
Replies: 6
Views: 3289

Re: Efficient calculation of gravity between many objects.

I think a common way to do this is with some spatial decomposition of the objects in your scene, for instance an octtree. I think roughly speaking, what goes on is that you will compute things like the center of groups of objects then approximate the net effect of that group by the effect of the ce...
by Sagekilla
Sun Aug 12, 2012 2:28 am UTC
Forum: Mathematics
Topic: How to show this in an equation?
Replies: 2
Views: 924

Re: How to show this in an equation?

What you have is that your object has energy E(t) = 3.34 10^{72} . The rate of energy loss is given by E'(t) = -k E(t)^4 . The rate of energy loss at time t = 0 is given as E'(0) = -1.78 10^{23} . Substitute back into the equation for E'(t) . Then ...
by Sagekilla
Tue Aug 07, 2012 12:45 am UTC
Forum: Mathematics
Topic: Mean Preserving Smoothing
Replies: 5
Views: 1791

Re: Mean Preserving Smoothing

I was just curious if it was possible to smooth a dataset (e.g. reduce variance) while maintaining the mean. No real reasons, just more of a mathematical curiosity to me. I happened to be looking at 1D, finite time series. The gaussian kernel thing seems (now) like the very obvious way to go for gen...
by Sagekilla
Sat Aug 04, 2012 12:13 am UTC
Forum: Mathematics
Topic: Mean Preserving Smoothing
Replies: 5
Views: 1791

Mean Preserving Smoothing

Is it possible to construct a method for smoothing a data set while simultaneously preserving it's mean? There's the obvious choices of simply rescaling or shifting all the values so it matches the original mean. But that only works if your smoothing is linear and both have pretty bad properties whe...
by Sagekilla
Wed Jul 18, 2012 4:32 am UTC
Forum: Coding
Topic: Roller Coaster Tycoon in... Assembly?
Replies: 39
Views: 37778

Re: Roller Coaster Tycoon in... Assembly?

We don't code in assembly for the very reason why languages like C# and Java are so popular. Coding in a low level language means you have to do *a lot* of work just to do something. Let's say I had a list of employees at a store and I wanted to get a list of employees who sold at least 100 items. I...
by Sagekilla
Tue Jul 17, 2012 11:05 pm UTC
Forum: Hardware
Topic: Critique my server build
Replies: 10
Views: 4050

Re: Critique my server build

It really looks like you just covered up the PSU fan... Not a good idea, even if you aren't breaking 150W. Pretty much. I ran the server overnight with a full load - both hard drives were fully loaded along with the CPU. I turned off my AC and closed my door for a worst case scenario. Not fun on my...
by Sagekilla
Sat Jul 14, 2012 11:27 pm UTC
Forum: Hardware
Topic: Critique my server build
Replies: 10
Views: 4050

Re: Critique my server build

So I figure I'd follow up on my server build. I ordered the parts and I decided to switch things up slightly. I have plans to build a mini rackmount cluster and I got a rackmount instead. Still used more or less the same parts that were listed along with Phoenix Enigma's suggestions. Here's some pic...
by Sagekilla
Wed Jul 11, 2012 11:52 pm UTC
Forum: Mathematics
Topic: The percent button on Casio calculators
Replies: 6
Views: 5304

Re: The percent button on Casio calculators

Maybe because the % operator acts in much the same way as a * or / operator? Clearly if you did something like: 8 * (3 + 6) This is not the same thing as: 8 * 3 + 6 That is, given some expression of the form A B % or B A %, the results are different. In other words, the operator doesn't commute unle...
by Sagekilla
Mon Jul 02, 2012 1:29 am UTC
Forum: Science
Topic: Planet size
Replies: 7
Views: 2044

Re: Planet size

Well if you keep the mass constant and vary the radius, the surface gravity doesn't change at all. What *does* change is gravity some distance away from the surface (e.g. gravity that the atmosphere experiences). So if you decrease the size of the planet while fixing mass, the gravity 100 km away fr...
by Sagekilla
Sun Jul 01, 2012 8:25 pm UTC
Forum: Hardware
Topic: how2 Blade Server
Replies: 5
Views: 2597

Re: how2 Blade Server

Rackmounts typically come in fixed form factors which are multiples of a common rack unit (1U = 1.75"). There's a piece of hardware available which can house multiple racks within it. These come in sizes like 42U and can hold many of these racks. Each rack typically is self sufficient. If one f...
by Sagekilla
Sat Jun 30, 2012 5:21 pm UTC
Forum: Hardware
Topic: Is this a good deal (server)?
Replies: 1
Views: 1623

Re: Is this a good deal (server)?

The sole fact that it comes with SQL Server 2008 and Windows Server 2008 may very well make it worth it. An enterprise edition of those is easily thousands of dollars. If it came as a disk with serial, that's insanely worth it. At least to me. If you're a non-developer it would be mostly useless. Ju...
by Sagekilla
Fri Jun 29, 2012 10:35 pm UTC
Forum: Hardware
Topic: how2 Blade Server
Replies: 5
Views: 2597

Re: how2 Blade Server

I would love to know where you got that from for $20. I'm going to build a small cluster and being able to buy blades for $20 would make things A LOT easier and cheaper. Actually, what I'm more interested in is *how* you found blade servers for $20 on Amazon, regardless of whether they were refurbis...
by Sagekilla
Wed Jun 27, 2012 10:44 pm UTC
Forum: Computer Science
Topic: IF/ELSE vs CASE in SQL Server 2008
Replies: 3
Views: 7559

Re: IF/ELSE vs CASE in SQL Server 2008

I'm sorry but the very premise of your argument is flawed. CASE and IF/ELSE are completely different operators meant for completely different things. IF is meant for control flow. You can use it to set a value or conditionally SELECT something, but that's not it's primary purpose. CASE, on the other...
by Sagekilla
Wed Jun 27, 2012 12:43 am UTC
Forum: Science
Topic: #808 GPS and relativity
Replies: 45
Views: 8877

Re: #808 GPS and relativity

Crassus, I noticed you posted twice about two separate comics being common misconceptions. You do realize that this *is* a comic and it's meant to be humorous in nature? That being said, there is the Individual Comic Threads Board all the way at the top of the board list. Most conversation about the...
by Sagekilla
Wed Jun 27, 2012 12:30 am UTC
Forum: Coding
Topic: Coding for science
Replies: 13
Views: 3477

Re: Coding for science

I just did my undergraduate as a dual major in Physics and Computer Science, so I have some experience with scientific computing. During that time I've used Matlab and Mathematica. I used Matlab for some AI stuff. It was okay and did the job; I think Matlab has it's place, but Mathematica stole my h...
by Sagekilla
Sun Jun 24, 2012 3:08 pm UTC
Forum: Hardware
Topic: Critique my server build
Replies: 10
Views: 4050

Re: Critique my server build

Hm. Good point. I suppose a fully loaded system with the specs I listed wouldn't draw more than what, 200W tops?
by Sagekilla
Thu Jun 21, 2012 1:19 am UTC
Forum: Hardware
Topic: Critique my server build
Replies: 10
Views: 4050

Critique my server build

I'm building a server that I (and some other people) will be using for: - File storage (*) - File serving (LAN, IIS or FTP) (*) - Build Server and Continuous integration (***) - Source Control (**) - Website test bed via IIS7 + SQL Server 2012 (**) The asterisks are in terms of how important the und...
by Sagekilla
Mon Jun 18, 2012 12:56 am UTC
Forum: Mathematics
Topic: Riemann Zeta Function
Replies: 15
Views: 4401

Re: Riemann Zeta Function

Another fun identity is that the sum in the OP equates to 1.
by Sagekilla
Fri Jun 08, 2012 2:34 am UTC
Forum: Hardware
Topic: Hard drive seek performance
Replies: 9
Views: 3476

Re: Hard drive seek performance

Are you familiar at all with B-Trees? They're typically one of the data structures utilized in databases for storing data. The way they work allows them to be fairly efficient w.r.t read/write access on a hard drive. There are some other tree data structures that are like B-trees which work on a spa...
by Sagekilla
Thu May 17, 2012 5:30 pm UTC
Forum: Coding
Topic: "Don't use comments"
Replies: 39
Views: 7533

Re: "Don't use comments"

If you find yourself commenting excessively then it's a sign of bad code, and there's definitely something to be said for making your code as clear and self-documenting (well structured with descriptive variable names) as possible, but I don't think that makes comments themselves a bad thing. Comme...
by Sagekilla
Thu May 03, 2012 6:45 am UTC
Forum: Computer Science
Topic: Data structures that spatially subdivide (3D) space
Replies: 7
Views: 3544

Re: Data structures that spatially subdivide (3D) space

Yes, im aware that using any tree data structure to accelerate the force evaluation will introduce force and potential errors. Hence me saying that im doing a multipole expansion when i walk the tree. Actually walking the tree is cheap. The expensive part is computing the force of a tree node on a b...
by Sagekilla
Wed May 02, 2012 8:50 pm UTC
Forum: Computer Science
Topic: Data structures that spatially subdivide (3D) space
Replies: 7
Views: 3544

Re: Data structures that spatially subdivide (3D) space

Is ~15 levels "ridiculously deep"? That's what a balanced binary tree (which KD-trees are) of 32K elements will have. Octrees and KD-Trees are pretty similar, the main difference is that KD-Trees divide one dimension at a time while trying to maintain a roughly balanced tree, while Octree...
by Sagekilla
Wed May 02, 2012 6:06 am UTC
Forum: Computer Science
Topic: Data structures that spatially subdivide (3D) space
Replies: 7
Views: 3544

Data structures that spatially subdivide (3D) space

So for my honors thesis I'm working on (among other things) accelerating the force evaluation in the N-Body simulation. The obvious data structure to use for accelerating the force sum is the Octree, used in the Barnes-Hut algorithm. Another interesting data structure is the K-d tree, which works we...
by Sagekilla
Sat Apr 21, 2012 4:15 am UTC
Forum: Coding
Topic: Aesthetics of Code
Replies: 4
Views: 2981

Re: Aesthetics of Code

Beautiful code is code that you can read without wanting to stab the eyes of the person who wrote it. No, seriously. If reading your code incites anger in me, then it is not beautiful. I should not get upset, angry, or otherwise have feelings negative in nature while I read through code. Code this a...
by Sagekilla
Sat Apr 21, 2012 4:04 am UTC
Forum: Coding
Topic: "Don't use comments"
Replies: 39
Views: 7533

Re: "Don't use comments"

Does such a thing actually exist in any language? That actually sounds really awesome and useful F# actually has built in support for units. You can specify a unit system and it provides automatic conversion for you. So you can say "This is in grams" then at a later point, say "I wan...
by Sagekilla
Sat Apr 21, 2012 3:56 am UTC
Forum: Coding
Topic: Constants
Replies: 9
Views: 2364

Re: Constants

The advantage of a constant is the same as the advantage of a variable - it names the value, which makes it easier to understand for others reading it. Making it const rather than a normal variable just makes it clearer that, well, it's a constant that you're naming, and you won't be doing anything...
by Sagekilla
Thu Apr 19, 2012 12:25 am UTC
Forum: Computer Science
Topic: MathBio Senior Needs to Learn Programming
Replies: 14
Views: 4985

Re: MathBio Senior Needs to Learn Programming

Disclaimer: I am a Physics/Computer Science major graduating this semester. I've done research for 4 years now, with most of my scientific computing geared towards Physics. I'm heavily geared towards certain types of languages because of this, and this should encourage you all the mother to explore...
by Sagekilla
Thu Apr 19, 2012 12:10 am UTC
Forum: Coding
Topic: Constants
Replies: 9
Views: 2364

Re: Constants

I agree with the sentiment that you should keep constants as local as possible. If you're using constants as some part of implementation detail, there's no reason why a client of that code should know about those constants. It should be possible to change the implementation without changing the outw...
by Sagekilla
Wed Apr 18, 2012 1:04 am UTC
Forum: Mathematics
Topic: Arccosine (trig function questions)
Replies: 12
Views: 2583

Re: Arccosine (trig function questions)

Alright... duh. Making it cos(G(x)) = l*sin(2x) This is one of those instances where, despite how nice the short hand is, I like to write out the inverse trig functions as arc* (arctan, arcsin, etc). I actually made the same mistake you did when I took my calc 1 class. We had to do implicit differe...
by Sagekilla
Sun Apr 15, 2012 12:57 am UTC
Forum: Mathematics
Topic: Probability - Hashing
Replies: 9
Views: 2485

Re: Probability - Hashing

YoungStudent wrote:Also if we would have Quantum Computers with extreme speed, couldn't all files get stored like that?


Quantum computers are not as fast as you think they may be. They allow certain types of algorithms to be done
efficiently, but they won't be any faster than a normal computer.
by Sagekilla
Sun Apr 15, 2012 12:00 am UTC
Forum: Coding
Topic: First project ideas?
Replies: 9
Views: 2238

Re: First project ideas?

Try implementing Conway's Game of Life. It's great fun.

http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
by Sagekilla
Sat Apr 14, 2012 12:36 am UTC
Forum: Mathematics
Topic: Logarithmically growing function with finite limit at infini
Replies: 10
Views: 3038

Re: Logarithmically growing function with finite limit at in

As has been stated, if it grows logarithmically it will approach infinity as x approaches infinity. Something that may fit what you want is 1-a*(1/2)^x, where a=1-f0. At x=0, this is 1-(1-f0)(1)=f0. At infinity, 1/2^x =0, so this equals 1. Note that you can replace 1/2 with any given number between...
by Sagekilla
Wed Apr 11, 2012 4:13 pm UTC
Forum: Coding
Topic: Do you like documentation in code, and if so, how/when?
Replies: 44
Views: 7607

Re: Do you like documentation in code, and if so, how/when?

I compulsively do not comment unless I know that other people will be looking at the code. My problem with this thinking, even if it's completely correct in the literal sense, is that "me in 6 months" is almost guaranteed to be another person. One of my proudest moments from coding occurr...
by Sagekilla
Wed Apr 11, 2012 3:15 pm UTC
Forum: Coding
Topic: Help me improve my code metric visualizer
Replies: 3
Views: 1165

Re: Help me improve my code metric visualizer

It sounds like you're doing something similar to a Continuous Integration/Automated Build project? I suppose it is some sort of CI system. It's ridiculously brute force though. You run it by hand and it tries to perform the SCA for each revision: for (int revision = start; revision < end; revision+...
by Sagekilla
Wed Apr 11, 2012 12:19 pm UTC
Forum: Coding
Topic: Help me improve my code metric visualizer
Replies: 3
Views: 1165

Help me improve my code metric visualizer

I just spent 10 minutes writing up this post before and the forums decided to log out me out and delete my post, so here's the short version until I write it up again. Background I wrote a tool for visualizing code metrics of a project that has some source control bindings. It's geared towards .NET...
by Sagekilla
Tue Apr 10, 2012 7:20 pm UTC
Forum: Coding
Topic: Website building/coding?
Replies: 27
Views: 10819

Re: Website building/coding?

... I'm a student, and I get free access to: SQL Server 2005 - 2012 (every edition for each version) Visual Studio 2005 - 2010 (again, same as above) Just about every version of Windows Most students can get the same exact thing. My university gives us free access to this software via a MSDN subscr...

Go to advanced search