Slashdot Mirror


User: he-sk

he-sk's activity in the archive.

Stories
0
Comments
970
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 970

  1. Re:Banking secrecy laws on Government Could Forge SSL Certificates · · Score: 1

    Interestingly, the Swiss High Court in Lausanne ruled in 2000 that Swiss tax authorities can use "stolen" data to prosecute tax evasion. Similarly to the recent case, the Germans got hand of a CD-ROM containing incriminating banking information and then forwarded data about Swiss citizens to the Swiss authorities.

    Source (in German): http://www.sueddeutsche.de/politik/825/502064/text/

  2. Re:Wait, What? on Throttle Shared Users With OS X — Is It Possible? · · Score: 1

    No single harddrive is able to fill a high-speed network connection and hasn't been able for a long time. And all Macs have had Gigabit ethernet for years now.

    Besides, I think the issues come from unexpected concurrent access which cause unexplainable slowdowns. If the designer opens a 500MB file in his photoshop, he knows that he's gonna have to wait a little bit, but if he's working on something and clicks on a button and suddenly the spinning beach ball from hell appears b/c some other process has trashed his disk cache and now the dialog won't come up, b/c the code was paged out to disk -- wow, that is a long sentence, I bet you feel stupid by now, kinda like the designer in question.

  3. And this is practical, how? on Privacy With a 4096 Bit RSA Key — Offline, On Paper · · Score: 3, Insightful

    Do people actually use the systems they produce and sell?

  4. Re:Interview With a Happy Owner on Turn Your Roomba Into a Household Google Bot · · Score: 1

    This was modded informative, why?

    To answer the question, I took it as an allegory to parents who don't take responsibility for their, well, parenting and rather drug their kids to keep them under control.

  5. Re:Use a persistence library on Anatomy of a SQL Injection Attack · · Score: 1

    I think that using a for loop to loop over my array of values is quite straighforward, and you can tell what it's doing without thinking about it.

    I wasn't ranting against the for-loop per se, I was irritated that you used a for-loop to join a list of (albeit generated) strings with punctuation. Every programming language has a function for that and if not it should be easy to create a general-purpose function yourself.

    Also, you have to think about your code, otherwise you'll miss the action in line 11 as evidenced by yours truly. My point was to make your code more clearly communicate what it does so these errors have less chance of happening.

    No one has yet commented on the bug that all three examples share (the empty list case) but that is handled just fine by my alternative (loading the list into a temporary table and joining in-database).

    PS: The execute function binds the list values of the second argument to the sql string in the first argument.

  6. Re:Use a persistence library on Anatomy of a SQL Injection Attack · · Score: 1

    Mea culpa. I was only looking at the re-implementation of the list join and was under the impression that the input values had already been cleaned up. In my defense, I will point out that this proves exactly my point: His code is so unreadable (=unmaintainable), that I introduced an error when trying to clean it up. The most important part of his code appeared at the end in midst of boilerplate. I would expect at least a comment that points out that what is happening in line 11 is completely orthogonal to the surrounding code.

    Here goes the second version:

    sanitized_list = map(list, sanitize_func)
    items = sanitized_list.join(", ")
    sql = "SELECT item FROM table WHERE keyword IN (" + items + ")"

    Or, if you insist on binding parameters:

    placeholders = ['?' for item in list]
    placeholders = placeholders.join(", ")
    sql = "SELECT item FROM table WHERE keyword IN (" + placeholders + ")
    execute(sql, list)

    I stand by the second part of my comment: Depending on the circumstances, loading a temporary table and then doing a simple join can be a better way to achieve the same result.

    PS: Since we're talking to the database eventually, the performance penalty due to iterating twice over the same data set is negligible. In any case, code readability is usually much higher on my priority list than speed.

  7. Re:Use a persistence library on Anatomy of a SQL Injection Attack · · Score: 2

    I cringe at this particular example of boilerplate code, b/c I have seen it so often lately and it's such an obvious choice for refactoring. If your language of choice has string join operator, the above code can be expressed in two lines:

    items = list.join(", ")
    sql = "SELECT item FROM table WHERE keyword IN (" + items + ")"

    Much more readable with a better chance to spot the bug in your code: What happens if list is empty?

    IHMO, better yet is to put the values in a temporary table using a batch insert and then perform a normal table join. This will allow the database to at least cache the query plan. Depending on the smarts of the SQL execution engine it could apply various other optimizations: Like sort the inner table (items) and then reorder the access to the outer table. (Of course, these kind of optimizations are theoretically possible without using two tables, but the last time I checked, PostgreSQL didn't bother.)

  8. Translation: I want money on US Unable To Win a Cyber War · · Score: 1

    Longer translation: The Marines/Navy/Army/CIA/NSA/whatever have all those shiny new toys! I also want toys. Gimme my toys!

  9. It's called a backup. on Avoiding a Digital Dark Age · · Score: 1

    That, and wide-spread usage of open standards and free software, of course.

  10. Re:Not surprised... on Apple Bans Jailbreakers From the App Store · · Score: 1

    I have to disagree. The app store lock-in is about "protecting" the consumer not screwing the developers. In fact, for a lot of independent developers it offers a sweat deal. Unfortunately, with every bureaucracy comes abuse. My bet is that the (current) app store concept will fail, just as iTunes DRM failed.

    IHMO Steve Jobs supports the app store is in large part based on a fear that a completely open system would be a huge target for malware. Now a good OS would mitigate against this, but this is a new market for Apple and so he's playing it safe. Understandable, because first impressions matter, especially if you're the "cool kid."

    I could be completely wrong of course. But Jobs built the Next station for pete's sake, a developers dream station at the time.

  11. Re:Not surprised... on Apple Bans Jailbreakers From the App Store · · Score: 1

    If you think the walled garden is not coming to regular OS X then think again. [...] Apple also learned from the iphone that many consumers will happily take any kind of abuse and lockdown so long as the device is "cool". They will bring this knowledge into their computer line, very soon Macbooks and Imacs will be running the Iphone OS on ARM Processors.

    Never gonna happen, for the simple reason that they need the independent Macintosh developers to provide them with the 140000+ apps to fill their app store. You need XCode to write iPhone apps and for XCode you need a full computer.

    Where I live, around 5 years ago more and more Apple laptops appeared in computer science university classes, b/c apple managed to marry a complete Unix stack to a nice and functioning GUI. It's a joy to develop on OS X. Of course, as soon as Apple closes up their OS X line, these people will be the first to jump ship. And after a while the masses will follow.

    Apple would shoot themselves in their own foot should they ever close up OS X.

  12. Re:The Book. on It's 2010; What's the Best E-Reader? · · Score: 1

    I can riffle through a real book to find the section I'm looking for in a minute. There's also a handy section at the front called the "table of contents". For a finer-grained search, books that need them have something called an "index".

    I can page-down through a thousand page txt file in a minute as well, but I rather use grep.

  13. Re:This will keep happening... on Overzealous Enforcement Means Even Legit Music Blogs Deleted · · Score: 1

    You lost me at PHP.

  14. Re:Control freaks on Apple's Change of Heart On Flash · · Score: 2, Informative

    If you're on a Mac, try this: http://rentzsch.github.com/clicktoflash/

    As a bonus, you can open H.264 streams from Youtube in Quicktime. Free Software, too!

  15. Re:Jobs once called Adobe lazy and he may be right on Apple's Change of Heart On Flash · · Score: 1

    With many websites you can get to the MP4 or FLV file that is displayed inside the flash player when you look at the HTML source. How come that VLC/Quicktime/whatever can play that file with my processor barely noticing, yet when I view the move inside flash, my Macbook starts screaming like a fucking jet engine?

    Sure, it's the processors fault. Not.

  16. Re:Another reason not to fly via Heathrow on "No Scan, No Fly" At Heathrow and Manchester · · Score: 1

    Security guards target people who they *perceive* to be more dangerous. In almost all cases (because terrorists make up a fairly small part of the population) this perception is fueled by their general stereotypes and their own prejudice.

  17. Re:Home schooling vs. school duty on US Grants Home Schooling German Family Political Asylum · · Score: 1

    "Nazism is not an opinion, but a crime." I tend to agree.

    Right. It's a crime to hold a certain opinion. Wonder where that idea comes from.

    Reading comprehension isn't your forte, is it now? As I've already told you it was your government along with its UK, French and Soviet friends.

    You also fail to grasp the particulars of the German ban on Nazi symbols. It's not against the law to think and say that Hitler was a great guy. You can tweet all day long about it! What you can't do is use a (black) swastika (in a white circle on red ground) as your Twitter buddy icon.

  18. Re:Welcome to 3 years ago on Why "Verified By Visa" System Is Insecure · · Score: 1

    Why would you want to rent a car in New York City?

  19. Re:Religion, not schooling on US Grants Home Schooling German Family Political Asylum · · Score: 4, Informative

    From the same declaration, Article 26: ... Elementary education shall be compulsory. ...

  20. Re:Hey Germany on US Grants Home Schooling German Family Political Asylum · · Score: 1

    You should read the Universal Declaration of Human Rights, specifically article 25 and 26.

  21. Re:Hey Germany on US Grants Home Schooling German Family Political Asylum · · Score: 1

    The fucking Declaration of Human Rights states that elementary education shall be compulsory. And rightfully so, to prevent parents with wacky beliefs from ruining their kid's future chances.

  22. Re:Brilliant! on US Grants Home Schooling German Family Political Asylum · · Score: 1

    Unless you're from Eastern Europe, i.e. one of the countries that joined the EU in the last round.

  23. Re:Home schooling vs. school duty on US Grants Home Schooling German Family Political Asylum · · Score: 2

    You seem to be under the impression of a lot of half-truth and misinformation.

    The German word for "citizen" is simply "Bürger". The term "Staatsangehöriger" does not literally mean "Subject of the State". A more literal translation would be "Member of the State" which is basically a description of the word "citizen". And the most likely reason (I'm guessing here) that the word Reichsbürger is no longer used is that the Reich ceased to exist in 1945. The Federal Republic of Germany and the German Democratic Republic are/were both distinct from it.

    Regardless of what you think about it, they were only two parties banned in Germany, both in the 50s. Not nowadays and definitely not zealously. With regard to banning speech, if you refer to Nazi propaganda, these rules were introduced by the Allies after their defeat of Germany. The vast majority of Germans are okay with that particular restriction, because they've subscribed to a variation of the meme "Nazism is not an opinion, but a crime." I tend to agree.

    Also, how many stupid and outdated laws are on the books in the US? Thought so.

  24. Re:Caps Lock Key on Does Your PC Really Need a SysRq Button Anymore? · · Score: 1

    I touch type and using shift to enter a text in all caps is a pain. Unless I can type all characters with one hand (how likely is that) I constantly have to shift between the left and right shift key. With the pinky no less, the weakest finger. That gets tiring very fast.

    So, no, don't take away the caps lock key.

  25. Re:It's the Ends, Not the Means on Organ Damage In Rats From Monsanto GMO Corn · · Score: 1

    We need it to feed our billions.

    Maybe we don't.

    From the 2006 study:

    With the average yield ratios, we modeled the global food supply that could be grown organically on the current agricultural land base. Model estimates indicate that organic methods could produce enough food on a global per capita basis to sustain the current human population, and potentially an even larger population, without increasing the agricultural land base.