Forgot your password?

Comment: Ensure tidy code for reviews (Score 1) 430

by roskakori (#42363669) Attached to: Ask Slashdot: Do Coding Standards Make a Difference?


The places where I worked used a simple guide line: the author has to clean up trivial issues before submitting an item for review. In case of code, this means ensuring style conventions.

Which in practice is trivial for reasonably popular programming languages:

First, you rarely have to invent your own style conventions. Instead, use existing standards. For instance, there are standard coding conventions for Java and Python.

If some guide lines do not make sense for your shop, simply change them to fit your needs. For example, PEP8 recommends a maximum line width of 79 characters. However, all our developers work a horizontal resolution of 1920, so we allow 132 characters. We also changed naming conventions from the loud and baroque SOME_CONSTANT to the calm SomeConstant.

Next, there are tools to check these conventions such as CheckStyle and flake8. Often you can even find tools to reformat source code consistently or automatically fix trivial issues like missing blanks, for example autopep8.

Some shops inject these tools in the commit hook of their version management and make it reject any code that does not conform. Baring that, the review moderator is required to run the style checks on the review item. If it turns out that the author still left style issues in the code, the moderator returns the item to the author and requests to clean it up.

That way, the reviewers always get tidy code and can focus on comprehensibility, maintainability and algorithms.


Comment: Re:Why do I need a Steam key? (Score 1) 159

by roskakori (#38368172) Attached to: New Humble Indie Bundle Goes Live

I don't want anything to do with Steam.

AFAIK you don't have to. Using the Steam key is optional (or at least was for the Trine bundle, but I doubt it changed for this one).

Once purchased, you'll receive an email that tells you where to download the DRM free archives for the game.

Alternatively, you can use the Steam key and let Steam care about the rest. I've never used mine, but I can see that it's convenient for other gamers because of automatic updates, friend lists, achievements, the "join game" function and so on. So if much of your gaming revolves around Steam, the optional key seems to be a good thing.

Comment: Remember Hyper-G/Hyperwave? (Score 3, Informative) 411

by roskakori (#37653490) Attached to: UN Bigwig: The Web Should Have Been Patented and Licensed




These days it doesn't even have an Wikipedia article anymore. According to its homepage, it found a niche for corporate intranets and now competes with SharePoint.

There are plenty of other early hypertext systems comparable to the WWW (going back to the 60ties). I seem to recall that Douglar Engelbart's NLS was heavily patented, though I cannot find a reference for this right now. (Though partially these systems certainly failed because of insufficient technology and lack of a target group. You can't blame everything on patents).

Comment: Re:"Reducing the number of container ship movement (Score 4, Insightful) 188

by roskakori (#37506616) Attached to: Are Folding Containers the Future of Shipping?

Once those containers get back to China and are loaded up with cargo, you now have 5 ships worth of cargo containers, but only 2 ships to transport them. Those 3 ships you left in the U.S.

Good point. Seems they need to find a way to fold ships, too.

Similar to bikes, planes and (to some extent) cars.

Comment: Ant instead of shell scripts (Score 1) 394

by roskakori (#34010876) Attached to: Taco Bell Programming

The gist of article seems to be that for many tasks people should combine the powerful Unix standard commands like find, grep, xargs, sed, etc instead of writing dedicated programs in lower level languages such as Ruby, Python, Java etc. This idea is not new, and many of the people around here have heard it 15 or more years ago. Being a developer, I always liked the perspective of having to write lesser code.

However, the Unix command line and shell script approach never really worked for me, especially if other people in the team wrote them. The main reasons for that are:

  • missing error handling (no checking for "$?", broken pipes, ...)
  • lack of consideration for special cases such as file names with blanks in them
  • difficult post-mortem analysis if the data causing an error got lost in a pipe instead of being available in an intermediate or temporary file
  • possible configuration nightmare to get non-ASCII characters working (depending on the actual platform you're on; it can be easy, too)
  • terse syntax with a tendency to "write only" code (which makes sense for a direct input command line but less so for code that should be maintained for years to come)

All of this could be overcome by measures such as checking $?, redirecting stderr, using temporary files, configuring encodings properly, documentation comments and so on. However, this rarely ever happens in practice.

For the past couple of years I have been using ant for many tasks formerly delegated to shell scripts. Its main advantages are:

  • provides many standard tasks to copy/move/delete files, search and replace in files, filter files, download files, send mails etc.
  • provides many ways to limit commands only to certain files depending on name, date, contents etc.
  • most tasks fail on encountering any error and consequently terminate the whole script (though this can be disabled for a certain task if needed be)
  • generic <exec> task to execute shell commands in case ant does not provide a standard task; you have to be careful with this one though and set failonerror="true" or it will continue even if it fails
  • pretty legible due to using english words instead of abbreviations for most things
  • many simple typos are already detected when ant parses your script and not only when a task gets executed.
  • platform independent syntax for file paths so your script can work on Unix and Windows.
  • takes care of all escaping and non-ASCII issues with files names.

Of course it's not perfect. For example, it uses XML and consequently contains some syntactic noise, it lacks advanced string operations, there are no pipes and sometimes seemingly trivial things result in a lot of messing around with properties. Nevertheless I rarely see a need to write shell scripts anymore except for simple launchers. YMMV but despite ant initially being a build tool for Java developers, we use it for many sysadmin-like tasks with great success and a small amount of development time.

Comment: Re:Get the *real* security to do it. (Score 1) 274

by roskakori (#32604204) Attached to: Employee Monitoring

If you want to know what is actually going on in a company, the 3 groups of people you need access to are the admins (who can watch people's computer use), the security guards (who can watch people's physical activities), and the bookkeepers (who know where the money and therefor the power is going).

In order to gain all this information, the only group of people you need access to are the secretaries.

Comment: Amiga 2000 to surf the web (Score 3, Interesting) 622

by roskakori (#28128675) Attached to: 45-Year-Old Modem Used To Surf the Web




Learning From EA's Annual Report 18

Posted by Soulskill
from the fun-on-all-fronts dept.
eldavojohn writes "GamePolitics rounded up some 'fun facts' from EA's annual report (PDF) and found among them: 'EA's failed bid to gobble up Take-Two cost the company $21 million,' while 'GameStop and Wal-Mart are EA's biggest customers; each accounts for 14% of EA sales.' It also shows that 'game content legislation and its potential effect on sales' concerns EA, as does the potential for a 'Hot Coffee incident.' More evidence that while it's good to be the big dog, it comes with a lot of responsibility and worrying."

Comment: Re:I've got a better idea (Score 2, Interesting) 585

by roskakori (#26641101) Attached to: Please No, Not a Blade Runner Sequel

According to the IMDB FAQ there seems to be some disagreement on this:

Is this film a remake?
[...] [T]here are clear similarities. Both films deal with a robbery, and feature a warehouse rendez-vous spot, a climactic Mexican stand-off, and the relationship between a veteran thief and an undercover cop, but Lung fu fong wan deals mostly with events leading to the robbery, while Reservoir Dogs is famously about the aftermath of an unseen heist gone wrong. [...] There are similar elements between the two films, but much of what makes Reservoir Dogs a classic - pacing, style, and some famous plot twists - is not present in Lung fu fong wan. Nevertheless, the debate has continued among some film fans.

Personally I can't think of any Tarantino movie I'd call "original" though some of them I find reasonably amusing.

Comment: Re:The thing about these machines is (Score 1) 360

by roskakori (#26361769) Attached to: The Best Gaming PC Money Can Buy

Your eyes can only pickup 80fps anyway; you wouldn't know if it was 100 or 10,000 fps unless the fps counter didn't say.

[...]Gunny how that number keeps creeping upwards. First it was 24 FPS (because that was all the eye could see), then 30, then 60, now you're saying 80.

There are to different issues at work which are well documented in literature and backup up with experiments:

  1. At a certain framerate, single images blur into an animation an can not be distinguished as single images anymore. This happens at about 25 FPS.
  2. If you flash a single image for a short enough time, the eye and brain will not be able to recognize it anymore. While the brain decodes an image, it does not have to look at it all the time due to a "burn in" effect with the eye. Because of that, the time you actually see the image can be very short. Experiments with showing silhouettes of airplanes to fighter pilots yield that some of them could still distinguish certain planes even if they were flashed for only 1/200 of a second.

So 25 FPS are enough to make a game look basically fluid, but 200 FPS can be useful to process rough and basic information. For example when quickly rotating the view and scanning for the muzzle flash of enemies firing at you.

And, as others pointed out already, more FPS means less latency. As example consider a muzzle flash the game internally creates 1 milliseccond after you last screen refresh. At 25 FPS, you will be able to actually see it after 40 milliseconds, at 200 FPS it only takes 5 milliseconds. This give you 35 milliseconds more time to process the information. But you still lose 4 milliseconds compared to a system with 1000 FPS.

Granted these milliseconds might not matter much for casually playing a shooter, for instance I still enjoyed playing Doom at about 20 FPS on an upgraded Amiga 2000 back then. But for competitive gamers these milliseconds might just be the edge they need to win some price money.

Passwords are implemented as a result of insecurity.