|
Aleksei Vasiliev posted:Wikipedia helpfully explains how to calculate the date of Easter Sunday in MS Excel using what appears to be the most convoluted method possible: quote:The Council of Nicaea (A.D. 325) set the date of Easter as the Sunday following the paschal full moon, which is the full moon that falls on or after the vernal (spring) equinox. It then goes on to give round dates, which I'm not entirely sure are actually that consistent. And then if you're trying to calculate Easter before the Council of Nicaea, then the best of luck to you.
|
# ? Feb 14, 2013 20:54 |
|
|
# ? May 27, 2024 13:55 |
|
Easter can go suck a dick, but Gauss's formula works and to be safe just get a list of the next 50 Easters and unit test that poo poo.
|
# ? Feb 14, 2013 22:00 |
|
We had a bug in our Easter function recently. It didn't work too well if you gave it 0 as input. (Not really a horror or anything. The bug was just that 0 was being passed in the first place.) But our stupid Hungarian notation, which is ugly on the best of days, is particularly foul here.C# code:
|
# ? Feb 15, 2013 08:16 |
|
Rocko Bonaparte posted:And then if you're trying to calculate Easter before the Council of Nicaea, then the best of luck to you. Clearly that's Undefined Behavior and makes your Easter program invalid
|
# ? Feb 15, 2013 18:09 |
|
For a couple of years I've been working on a game, and the biggest nightmare I'm going through now is recoding it so it can be more readable when I add more characters and enemies, which allows me to make no features and have it run virtually the same. It's wasted about a month when I should have just thought this through and did it right the first time. I'm also realizing just now the redundant enemies and single characters should come from the same super class, because their behaviors can be the same. (A character you can talk to can switch modes and become an enemy that you can fight, and an item can behave like an enemy.) I read through this thread that brought up a good point of not making everything as perfect as it could possibly be in a program, because you'll end up working on it forever. After I'm done with this update, I'm certain this time I won't have to do much more with how the engine works. It's hard to wait for the benefits, but I'm certain it will be worth it.
|
# ? Feb 15, 2013 22:20 |
|
Yeah that's the one thing you can't learn except by doing. You have to make some really awkward code at first and only then will you realize how and why object reuse, inheritance, & composition are great ideas. At some point you'll have enough "tools" sitting in your spine that you'll start to see the similarities between different problems and how they can be solved using those tools. But I haven't met anyone who really got it without writing some really awful horrors first, including myself.
|
# ? Feb 15, 2013 22:41 |
|
LP0 ON FIRE posted:It's wasted about a month when I should have just thought this through and did it right the first time. You're improving and realizing how past you from n months ago was an awful programmer. Welcome to the club. As you improve, everything before looks like a horror.
|
# ? Feb 15, 2013 22:55 |
|
Zamujasa posted:You're improving and realizing how past you from n months ago was an awful programmer. Welcome to the club. As you improve, everything before looks like a horror. I constantly run into situations where I've looked at code I had wrote earlier that day and winced.
|
# ? Feb 15, 2013 22:57 |
|
Back around 1999 ish I started a website originally for putting up Aphex Twin lyrics, and later for general IDM lyrics. I still have the code around, and it is hilariously bad. The first couple of versions actually took down the server a couple of times cause they spammed the apache logs with so many perl errors that the hard drive would fill up in less than a week (and the traffic was seriously very very low). This is how it looked in 2001: http://web.archive.org/web/20011204041630/http://idmlyrics.vectorx.org/ In the first couple of versions, it was like, all HTML output was through print statements, GET params being used as file paths, etc, etc. Loops were retarded: Perl code:
|
# ? Feb 16, 2013 00:27 |
|
LP0 ON FIRE posted:It's wasted about a month when I should have just thought this through and did it right the first time. Bobbin Threadbear fucked around with this message at 00:47 on Feb 16, 2013 |
# ? Feb 16, 2013 00:31 |
|
http://scientificninja.com/blog/write-games-not-engines
|
# ? Feb 16, 2013 00:38 |
|
Carthag posted:Back around 1999 ish I started a website originally for putting up Aphex Twin lyrics, and later for general IDM lyrics. I still have the code around, and it is hilariously bad. The first couple of versions actually took down the server a couple of times cause they spammed the apache logs with so many perl errors that the hard drive would fill up in less than a week (and the traffic was seriously very very low). Hey, writing a webpage in the year 190 is seriosuly impressive. e: "whores of MS"
|
# ? Feb 16, 2013 01:05 |
|
LP0 ON FIRE posted:For a couple of years I've been working on a game, and the biggest nightmare I'm going through now is recoding it so it can be more readable when I add more characters and enemies, which allows me to make no features and have it run virtually the same. It's wasted about a month when I should have just thought this through and did it right the first time. I'm also realizing just now the redundant enemies and single characters should come from the same super class, because their behaviors can be the same. (A character you can talk to can switch modes and become an enemy that you can fight, and an item can behave like an enemy.) Technical debt is okay. You just got to remember that you'll have to repay it.
|
# ? Feb 16, 2013 01:20 |
|
LP0 ON FIRE posted:I should have just thought this through and did it right the first time. You're not doing it right this time, either. In my experience, you aren't really getting close until the third or fourth time around.
|
# ? Feb 16, 2013 01:54 |
|
Strong Sauce posted:Technical debt is okay. You just got to remember that you'll have to repay it. For learning to code, you don't always have to repay it, you can just write something new instead. For commercial code, you can just move jobs
|
# ? Feb 16, 2013 02:09 |
|
Zhentar posted:You're not doing it right this time, either. In my experience, you aren't really getting close until the third or fourth time around. Yeah, you've got to remember that the knowledge you have now is not the knowledge you had then. Odds are, even if you really put effort into more planning up front, you still would've had plenty of blind spots you didn't even know existed. Better to get the runs on the board and understand you may have to rework stuff later on once you understand the problem better, than to spend ages in planning hell for diminishing returns.
|
# ? Feb 16, 2013 02:13 |
|
Maluco Marinero posted:Yeah, you've got to remember that the knowledge you have now is not the knowledge you had then. Odds are, even if you really put effort into more planning up front, you still would've had plenty of blind spots you didn't even know existed. Better to get the runs on the board and understand you may have to rework stuff later on once you understand the problem better, than to spend ages in planning hell for diminishing returns. So when do you plan? Not trying to stir up poo poo, just curious.
|
# ? Feb 16, 2013 03:12 |
|
Innocent Bystander posted:So when do you plan? Not trying to stir up poo poo, just curious. It's a cycle. The point of an agile cycle is that you're constantly moving through a Plan - Do - Review process, to keep it simple. You plan with the knowledge you have available, and then get to work. At the end of your iteration / sprint, whatever you want to call it, you're reviewing how your plan matched up with how things actually went, and that effects how you plan the next iteration. The important thing is that you learn the knowledge you need to plan accurately in the Do and Review process, not in the planning process. You don't actually KNOW that this architecture, or this toolkit works in this situation until you actually try to do it and review the pros and cons you directly experience. How you plan to gain that knowledge is up to you, but you need to DO something to get it, whether it's prototyping, running tests, whatever.
|
# ? Feb 16, 2013 03:30 |
|
Innocent Bystander posted:So when do you plan? Not trying to stir up poo poo, just curious.
|
# ? Feb 16, 2013 03:36 |
|
yaoi prophet posted:Hey, writing a webpage in the year 190 is seriosuly impressive. ya the year 190 was p chill
|
# ? Feb 16, 2013 09:36 |
|
Plorkyeran posted:When there are multiple people involved. That's about it, in my experience. Yeah, planning on your own never works well. Planning should be an argument.
|
# ? Feb 16, 2013 12:36 |
|
Innocent Bystander posted:So when do you plan? Not trying to stir up poo poo, just curious. You can't really plan how something must work technically and how much time do you need for all that, but you can and should plan what do you need to accomplish (and how, exactly, in a clear line of thought is that going to result in $$$), and how the application should behave to match these guals. You've got to have a clear vision of how your work is even going to be useful and successful in the first place, otherwise everything else is a wasted effort. Then, given a clear attempt to specify exactly how should the application work and look like, before committing too much into building the thing. If you're building a website, then it's much easier and cheaper to draw a lot of mockups and pictures of all the flows on pieces of paper, rather than 6 months into coding have the customer decide she doesn't like any of it. Planning "why" and "what" is useful, planning "how" and "when" far less so.
|
# ? Feb 16, 2013 14:27 |
|
Innocent Bystander posted:So when do you plan? Not trying to stir up poo poo, just curious. A couple times a day. Your understanding of the problem improves, requirements change, plans get outdated.
|
# ? Feb 17, 2013 00:14 |
|
DSLs are awesome!C++ code:
C++ code:
Scaevolus fucked around with this message at 06:59 on Feb 17, 2013 |
# ? Feb 17, 2013 06:51 |
|
I'm not one of those that laugh at memes all day, but we have an interface that describes whether an object can have documents attached to it. The interface is called IHasDocuments. I can has documentz?Carthag posted:Yeah that's the one thing you can't learn except by doing. You have to make some really awkward code at first and only then will you realize how and why object reuse, inheritance, & composition are great ideas. At some point you'll have enough "tools" sitting in your spine that you'll start to see the similarities between different problems and how they can be solved using those tools. But I haven't met anyone who really got it without writing some really awful horrors first, including myself. Zamujasa posted:You're improving and realizing how past you from n months ago was an awful programmer. Welcome to the club. As you improve, everything before looks like a horror.
|
# ? Feb 19, 2013 09:35 |
|
Aleksei Vasiliev posted:Wikipedia helpfully explains how to calculate the date of Easter Sunday in MS Excel using what appears to be the most convoluted method possible: Just to be fully baller you need to use the first one. I pity the person who figured that out, though.
|
# ? Feb 20, 2013 12:51 |
|
Pilsner posted:I don't think it's that we were necessarily bad devs n months ago, it's just that requirements change and you have to code for what you know right now. No one will ever, even with 50 years of experience, write the right code the first time. All code goes through a cycle where it's due for an overhaul sooner or later, the more you work on it. You can't do a complete rewrite every time you need to introduce a little new feature, and after 10 of these it probably stinks. If you have never feel the "I was drunk when I wrote this?", you have not programed enough, or long enough. Its not that old code is bad, is that take the wrong route in maintanibility, scalability or any other -ity or -ism. You know what route to go now precisely because you have already explored the dead ends. Tei fucked around with this message at 15:29 on Feb 20, 2013 |
# ? Feb 20, 2013 14:58 |
|
Got lazy and used google to do some arithmetic on addresses from a FRAM dump, using this query:quote:(0x1e20 - 17e0) in decimal At least I found my fuckup before I started digging through the code that generated the dump to determine why the "wrong" amount of data was written.
|
# ? Feb 20, 2013 21:49 |
|
On a temp contract with a company right now doing some pretty cool work. Finished it up early and they asked me to spend a week just tweaking their online shop built in netsuite to make it more brand consistent and seo friendly or whatever. So okay, never used netsuite, how bad can it be? It's like house of leaves in here, the deeper you dig the more the tables expand into more tables, I haven't seen anything close to this bad in ten years of development, even by ten years ago standards. It's fascinating.
|
# ? Feb 21, 2013 06:18 |
|
I like that the order of attributes on tags is completely random. Gotta stay away from consistency.
|
# ? Feb 21, 2013 07:22 |
|
code:
|
# ? Feb 21, 2013 07:31 |
|
Clavius posted:tables I like how you complain about a 10-year-old style of html while using a 12 year old OS and listening to 20 year old music Seriously though, I find tables can often be useful for non-tabular layout, especially if you have to support stupid old browsers like IE6 without introducing some serious div-soup. I wouldn't say it's that big a horror for auto-generated html. Kinda odd using the font tag with a css class though... vvv: You can use the ugly Windows 95 corporate grey taskbar in Windows 7? I had no idea. I guess some people really loving hate change. ..btt fucked around with this message at 10:18 on Feb 21, 2013 |
# ? Feb 21, 2013 08:44 |
|
..btt posted:using a 12 year old OS
|
# ? Feb 21, 2013 10:12 |
|
Clavius posted:On a temp contract with a company right now doing some pretty cool work. Finished it up early and they asked me to spend a week just tweaking their online shop built in netsuite to make it more brand consistent and seo friendly or whatever. So okay, never used netsuite, how bad can it be? That looks a bit like the code I maintained a couple of years ago. Every value was rendered as a table. So a status indicator that was a just a green box with the text OK inside it was actually <table><tbody><tr><td style="background:green">OK</td></tr></tbody></table>, or something similar. edit: Oh hey, I thought I might have posted about this before: Wheany posted:
Wheany fucked around with this message at 10:35 on Feb 21, 2013 |
# ? Feb 21, 2013 10:30 |
|
Pilsner posted:He looks like an intelligent person who uses the classic style taskbar in Windows 7. gotta make my 3 year old operating system look like a 17 year old operating system
|
# ? Feb 21, 2013 11:41 |
|
Clavius posted:On a temp contract with a company right now doing some pretty cool work. Finished it up early and they asked me to spend a week just tweaking their online shop built in netsuite to make it more brand consistent and seo friendly or whatever. So okay, never used netsuite, how bad can it be? I think I am most fond of the fact that the tr is actually styled using display: table-row.
|
# ? Feb 21, 2013 14:34 |
|
Pilsner posted:He looks like an intelligent person who uses the classic style taskbar in Windows 7. Looks like the Windows XP icon on the start button to me. The Vista and Windows 7 icons have the icon lighter in the center, while XP has the faux flag 3D shading.
|
# ? Feb 21, 2013 16:02 |
|
Suspicious Dish posted:Looks like the Windows XP icon on the start button to me. The Vista and Windows 7 icons have the icon lighter in the center, while XP has the faux flag 3D shading. Yeah, man. Any true nerd knows this.
|
# ? Feb 21, 2013 16:09 |
|
Clavius posted:On a temp contract with a company right now doing some pretty cool work. Finished it up early and they asked me to spend a week just tweaking their online shop built in netsuite to make it more brand consistent and seo friendly or whatever. So okay, never used netsuite, how bad can it be? You need to look at that with the new 3d viewer thingy in firefox. A goddamn mountain of failure, jutting out of the page.
|
# ? Feb 21, 2013 16:13 |
|
|
# ? May 27, 2024 13:55 |
|
Whoah that 3D thingy is pretty cool.
|
# ? Feb 21, 2013 17:09 |