Posts for Nach

Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Derakon wrote:
* The first time you write something, do it in-line. That is, don't make a separate function for it; just incorporate it into your program.
That's taking a limited view on functions. Functions aren't just about making parts of your code reusable. They're also about making parts of your code readable. If you have some complex logic which can be named in a descriptive fashion, move into a function even if you only use it once.
Derakon wrote:
Lots of functions is bad largely because it means that when you're trying to figure out what a given piece of code does, you have to go bouncing about the codebase a lot tracking down what all of the functions the code calls do.
Your problem is the sign of a bad programmer, or badly created functions. You shouldn't have to track down a function to know what does. You should know from its name. If you had to also look inside the function, it's a sign you're a bad programmer, or the function is poorly named. So on the flip size, break down your code into sensible functions. Each function should do exactly what it says it does and be appropriately named. This way any part of your code should be readable and fixable on its own. Abstracting away logic to other functions helps understanding the current function better. Remember, programming is about managing complexity. No matter how smart you are, there will always be a function which you can't keep the entire flow of it in your head without breaking it down. So you might as well break down even large cases that you can keep all in your head, and use your spare brainpower for other needed improvements.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Bisqwit wrote:
No takers for my program? It contains education in small size about a number of popular standards, about Chrono Trigger, and about one particular feature of WWW that is very rarely used.
Well I thought it was obvious for the most part, with good function names and clear strings which says what it does. You got a minimalistic HTTP Server using x-mixed-replace which I wasn't even sure what it was till I looked it up. You also have a PCX decoder which is rather trivial. What I do find very enlightening about your mini program is that it has a PNG encoder. I never considered doing that without using libpng. However, since you requested it, I decided to actually download the code, compile it, and test it out. Here's where I got a bit shocked. You have an animated image, I'm still not sure how you pulled that off, and I even have the code in front of me.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Warp wrote:
Nach wrote:
Perhaps we should wait 6 months before publishing? Yes.
If the original point was "it's a great thing that submissions don't stay in the queue for months, but we shouldn't go to the other extreme either", why are you suggesting the original extreme as the "alternative"? Nobody has suggested that the submissions should be delayed for months, so why are you writing as if that was the implication?
Did you completely not notice it was in response to what moozooh said? Take things in context.
Warp wrote:
I honestly can't understand why you are acting like judges waiting a few days for people to comment on a submission would be such an unreasonable suggestion. What exactly is the problem here?
I don't have a problem with that. What I have a problem with is when a judge didn't wait a few days, people complain. Judging, encoding, and publishing is a lot of effort. How would you feel if someone insulted your hard work because you did it promptly?
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
moozooh wrote:
Nach, for the record, the "we donate our free time so that you bastards could enjoy it" type of argument is very cheap.
That wasn't the argument. You turning it into such is disrespectful.
moozooh wrote:
The reason is that every single thing about this site, or any hobby in general, is taking our free time. Judging takes free time, but making movies does so as well, and even watching them — perhaps THE integral part of the site — takes free time. Now if you're going to convince everyone your free time is more valuable than anyone else's you just won't go very far with that. As much as we should appreciate what judges do, judges should appreciate the watchers and the movie makers. Not any less.
Nothing was ever said to the contrary.
moozooh wrote:
But if you want me to go deeper than that I can also point out that making and watching TASes existed before the institution of submission judgement, so here I unambiguously hint to you that using such an argument here can be seen as self-justification. I hope you won't use that argument in the future.
I don't know what you're talking about.
moozooh wrote:
Think for a moment that this site wasn't made for the administration, but for the audience (and its members who come from, and remain, the audience) to enjoy. Naturally its goal should be constant improvement of the environment in accordance with most productive means of going through the "creation -> submission -> appraisal -> discussion -> publication -> improvement" chain. "Rushed publications", while they seem productive in the sense of speedy content delivery, undermine some of the aspects of the comfortable process of going through that chain. They just forcibly break it. It's not productive, and it's not polite.
I fail to see anyone breaking the process.
moozooh wrote:
Oh yeah, and certainly it shouldn't be harder for our judges and publishers to do some things slower. Don't you agree? If you don't agree I'll throw feces at you, I swear.
Perhaps we should wait 6 months before publishing? Yes. It's ungratefulness like this that I stopped publishing for the most part.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Code repetition isn't just a common beginner mistake, it's the cardinal programming sin. Of course the better you are, the more you realize what is repetitious. http://insanecoding.blogspot.com/2009/05/ancient-coding-ideas-finally-in-english.html http://insanecoding.blogspot.com/2009/05/ancient-coding-ideas-finally-in-english_25.html
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Warp wrote:
You mean that most people do consider the technical rating to be a pure number which indicates the amount of flaws/possible improvements in the run? Considering how people have written about that rating in the past, that's probably (and sadly) the case. I would hope it wouldn't be so, but I can't stop people from having free will, I suppose. My quest for the rating to be more expressive and interesting than a boring flaw count is probably futile.
Yes. Or along those lines.
Warp wrote:
I didn't want my text above to sound like an accusation (although it admittedly sounds like one). I was simply suggesting that it would be one way to show in practice that judges appreciate people's opinion by waiting for it and reading it.
Judges do appreciate it. Although it's not always needed. Some runs here get built up in a discussion topic, or frequently discussed over IRC with demos. The judge along with others he has spoken to may have already seen most of the movie a dozen times by the time its published.
Warp wrote:
Many acceptance/rejection notices by a judge do indeed contain a reference to the forum feedback, which is always nice. I'm just fearing that if some runs are rushed into publication, it may show that the judge wasn't even interested on people's opinions.
I think the converse needs to be spoken for. Here we have judges spending their free time really thinking about a movie, and encoders using a lot of time and hard drive space, and effort to encode a movie, sometimes many times. Then they got to upload it and edit and all kinds of stuff, and in the end, we sometimes get "Hey? Why so fast?". It's ungrateful that people here are even fathoming using a term like "rushed publication". There will always be mistakes either way, but people helping out don't need to get their noses rubbed in it, which is what happens every time someone complains about a rush.
Well, one way of avoiding such situations is not to rush a publication, wouldn't it?-) I do appreciate that judges/publishers are eager to publish new material, but sometimes it's good to use some diplomacy.
Sure is diplomatic of you to keep using the word rush there. Problems are rare, stop telling publishers they're rushing. It's not nice.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Warp wrote:
Nach wrote:
Even if we rejected all those, if you were correct, then why isn't every movie of at least of recent publication getting a perfect 10 in the technical ratings?
Because, hopefully, most people understand what is meant with "technical quality" (or at least what I meant when I implemented it and have tried to emphasize in numerous occasions): It does not mean "does it contain flaws or possible improvements?" At least not exclusively. While flaws may be considered when estimating the technical rating, IMO it should only be a relatively small part of it.
That's not actually what's happening.
Warp wrote:
Likewise not all games lend themselves to a technical rating of 10 because not many (if any) superb TASing and running techniques can be used with them. That's (I hope) the answer why not all runs get a technical (nor entertainment) score of 10, no matter how "perfect" they might be.
If you review the runs, that's obviously not the case. In terms of pure technique I'm surprised that all the NES SMB runs don't all have a perfect 10 (or at least close to it for tech). Some have told me they don't give high scores in tech because "what if".
Warp wrote:
And as a side note, seemingly my argument of "if for nothing else, as a token of appreciation that some people still care to watch the submissions and comment on them" has fallen completely on deaf ears. Would showing some appreciation be too much to ask? It's not like it would be more laborious, tedious or technically difficult to do so. Although that's just my view.
It is appreciated. I think the converse needs to be spoken for. Here we have judges spending their free time really thinking about a movie, and encoders using a lot of time and hard drive space, and effort to encode a movie, sometimes many times. Then they got to upload it and edit and all kinds of stuff, and in the end, we sometimes get "Hey? Why so fast?". It's ungrateful that people here are even fathoming using a term like "rushed publication". There will always be mistakes either way, but people helping out don't need to get their noses rubbed in it, which is what happens every time someone complains about a rush.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
I guess its too late, the Gruu got it.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
I know TASVideosGruu is just itching to reject something. So let me know quickly what the deal with this hack is.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Bisqwit wrote:
Nach wrote:
x&UINT32_C(037777777776)
That's the most complex way of saying x > 1 that I have ever seen... Not that the rest of the function is much better. ;)
Glad you liked it. Most people are shocked when they realize what the function actually does. Then they really get perplexed when working out the math.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
If we're going to be posting what does this do riddles, let us at least start off with some simple stuff. [code c] uint32_t f(uint32_t x) { return((x&UINT32_C(037777777776))?(f(x-1)<<1)-f(x-2)+2:x); } [/code] What does f() do?
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
What Tub said got me thinking. I made a few tweaks to the forum source code. Hopefully the forum will run a bit faster now, and have less errors. Let me know how it works for you.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Tub wrote:
today I got the lock timeout error quite often. It's always the session table, always the same query. Do you know why it happens there but not anywhere else? a workaround might be to change sessions.php[370] to not fail on error 1205 or to change the table to a MEMORY table (if it isn't already). Or change the value at line 365 to something higher than 60 seconds to reduce the amount of session updates.
phpBB : Critical Error Error updating sessions table DEBUG MODE SQL Error : 1205 Lock wait timeout exceeded; try restarting transaction UPDATE sessions SET session_time = 1257721826, session_page = 0 WHERE session_id = '<snip>' Line : 370 File : sessions.php Backtrace: includes/functions.php[743]: ErrorPrintBacktrace() includes/sessions.php[370]: message_die(204, string(29) "Error updating sessions table" , string(0) "" , 370, {string(55)}, {string(130)}) index.php[38]: session_pagestart(string(8) "5ce28ce8" , 0)
it might also be caused by repeated DELETEs on the session table around line 390 that lock the table for a while. If that's the case, enclosing them in an
if (mt_rand(1, 100) == 42) { ... }
might be a good idea.
Thanks for the advice. I made some tweaks, I hope they work. Regarding the deletes, you mean in session_clean()? If they're done less frequently, that just means each subsequent call that does run will take longer. Although perhaps that's a good trade off if we're running so many at once.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Derakon wrote:
* There's a TASer working on the run right now. He/she has the energy and desire to improve it, and can do so more easily than anyone else at that time, having all the knowledge related to TASing the game fresh in memory.
Yes, and many don't want to go back and redo a lot just for a small savings. The odds of savings are more likely to be not near the end than near the end.
Derakon wrote:
* It encourages people to give the runs more scrutiny. Suggesting improvements is one of the best parts of member interaction here. If we don't give enough time between submission and publication for this to happen, we're discouraging that interaction.
I have no hard data on that. I think people can scrutinize a run after it is published just fine. In fact, even more people can do so.
Derakon wrote:
* It's more satisfying for many of our members if the runs we publish are the best we are currently capable of producing. Publishing a run with known significant improvements, then, is a bit rankling.
We already do publish runs now and then are recognized not to be perfect. Even if we rejected all those, if you were correct, then why isn't every movie of at least of recent publication getting a perfect 10 in the technical ratings? We don't even have our NES SMB runs getting perfect 10s in technical when at the time of publishing, no one knows how to do it better, or even if they did, won't save more than a frame or two.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Tombad wrote:
Nach wrote:
Live HTTP Headers
I use HttpFox, is there any fundamental difference?
Yeah. I wasn't aware of HttpFox, and on comparing them, HttpFox seems to do a lot more.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
If you do encode it, remember, audio at 32000 Hz.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
I buy games only if I want them. Generally because they're a sequel, or I played it by a friend and saw it was interesting, or read a review which really got me interested. However I have a few criteria before I plunk down cash for it. 1) No DRM. I didn't buy Red Alert 3 despite how much I love the series, because I can only install it 5 times, which is unacceptable. 2) Right price. I'm not going to spend a small fortune on a game which I'll be done with in 2 hours. Generally this means I'll be waiting till the game is 2-5 years old and becomes bargain bin. Although there have been good exceptions, I bought Mega Man X4 for PC right went it came out for $8. Capcom generally has good PC game prices and gives discounts for early birds. 3) No almost malware. I don't want any game which installs all sorts of background monitoring junk or severally modifies my system. It's for these reasons I like playing games in the normal popular emulators. The price is great. I can install it as many times as I want and copy it to any of my machines. They don't require installing all sorts of junk, and they're self contained well. Most don't even use the registry. Most I can just copy the directory to another computer and have all my settings and saves exactly as I left them.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
moozooh wrote:
Nach wrote:
We don't have to cry about something being published within 2 days.
I like how your point went from the original quote's "before anyone else weigh in" to the current "within 2 days". Two days is, as I said above, reasonable, and a lot of people can weigh in during this time, contrary to what you've said. Now you're retroactively changing your statement and use it to ridicule my argument, nice job. :D
I'm using your supplied time interval and saying less than that is fine. Anyone at any time can realize a small improvement. It may be 3 hours after the movie was submitted, 3 days, 3 weeks, 3 months, or 3 years. How long should we wait to publish? Also, once accepted, it doesn't have to be encoded immediately, there's still time for someone to say something. Encoding itself also adds a few hours for longer videos. I'd find several cases where the judge judged incorrectly and use that as a point for building up a certain minimum time instead of saying sometimes we rush things. I don't believe anything is rushed if a judge judged a video. This is not life and death, decisions don't need to be slept on.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Newcomers won't have a clue what do with key press files, nor want to bother with the hassle. Nor are preencodes necessarily common or easily accessible. The point isn't an empty queue, but quick updates to new content. We don't have to cry about something being published within 2 days.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
andrewg wrote:
Has anyone tried using the time stopper item in order to kill any of the bosses faster? Would getting this item manipulate their positions in favorable ways possibly?
An excellent example of putting this to good use. Someone test it!!! Maybe use it to manipulate when Birdo fires his first egg.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
While we're on this topic... From IRC: <Nach> if a judge watches a movie immediately after submission, and it kicks the old one in every way, and after watching it, he has to scrape his jaw off the floor and find where his eyeballs rolled to, I don't see what the problem is with him accepting it before anyone else weighed in
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Warp wrote:
Nach wrote:
If you're a web developer, there's also a couple of must have Firefox extensions, although they don't improve the general browsing experience.
You mean like firebug? Yes, a friend of mine who works in the web development industry says that it's an indispensable tool.
Not just firebug. Web developer toolbar, DOM Inspector, Smush.It, User Agent Switcher, Live HTTP Headers, YSlow. There's also this new one from Google that I'm thinking about installing, but I forgot what it was called.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Highness wrote:
The RSS-address on this site is not working anymore right? http://tasvideos.org/XMLDataFeed.html It points to http://tasvideos.org/movies.rss
Thanks for the report, URL fixed.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
If you're a web developer, there's also a couple of must have Firefox extensions, although they don't improve the general browsing experience.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
In case it wasn't obvious, you can also see the news at: http://tasvideos.org/News.html
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.