Slashdot Mirror


User: pavera

pavera's activity in the archive.

Stories
0
Comments
1,130
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,130

  1. Re:Static vs. Dynamic Typing on Van Rossum: Python Not Too Slow · · Score: 1

    The problem with your argument is it isnt "a little less code". I regularly over 10 years have had at least 50% code reduction when converting from C/C++/Java to python. Currently I'm converting 250k lines of C++ to python... I'm on course for a 75% reduction in code.

    Now python is not a magic bullet, you do have to know how to use it... as an example at a previous job my team re-wrote a python program in python, and reduced lines of code by 50%... The original devs were C developers who were told "you will write this in python". They thought in C, the wrote in C, they took zero advantage of the standard library, they reimplemented the "lower" method all strings have.... The only reason it was python was the syntax was python. If you're thinking in Java, and writing Python, your code won't get shorter. You have to embrace functional programming where it makes sense to eliminate lines of code. You have to think in python and understand the standard library and what it can do for you to really get lots of code shrinkage. But it is possible to massively decrease the amount of code for the same feature set.

  2. Re:Static vs. Dynamic Typing on Van Rossum: Python Not Too Slow · · Score: 3, Interesting

    The point is I can (and have) replaced 100k lines of C, 150k lines of java, or 110k lines of C++ with 10-15k lines of python.

    I don't care who you are, its easier and faster to write 15k lines of code than 100k lines of code, significantly faster. Its easier and faster to debug 15k lines of code than 100k lines of code, again significantly. Most bugs are not type errors. Most bugs are logic errors. Sure, is a type error annoying? Yes, but it annoys *me* as a thinking person that I changed the assumed type of a function argument and didn't go change a caller, its not the languages fault that I forgot, just like its not C/C++/Java's fault when you walk off the end of an array and segfault... automated tests find these bugs just as reliably as a compiler, and you have to write automated tests to test logic even in a statically typed language, so its not extra work.

    The tradeoff is that my python code might run slower (if the modules I'm using aren't already C which a lot of them are), but vs Java, startup time is significantly faster, and memory usage in python is significantly better, like an order of magnitude at least. vs c/c++ I don't have to deal with pointers, null dereferencing, memory management, or any of those headachy things that a large proportion of developers do wrong, and end up with insecure programs. So... to me at least the choice is clear. Shorter code that is easier to read, easier to debug, quicker to write, easier to maintain, and generally has less bugs, python gets all those things 100% of the time vs C, C++, or Java. The only downside is it might be slow... and if it is, you write a couple hundred lines of C, write all manner of tests around it to make sure it deals with all the pointer stuff correctly, and you're still way ahead of a pure C program.

  3. Re:Static vs. Dynamic Typing on Van Rossum: Python Not Too Slow · · Score: 2

    All I can say is you've obviously never built a large scale system in either a static or dynamic language... The number 1 correlation between bugs and code is the number of lines of code. More lines of code == more bugs. Always, every time. The fact that I can write the same thing in python in 1/5 or 1/7th the code vs Java or C++ means on average I'll have less bugs.

    As someone who's spent the last year rebuilding in python the middle and frontend tiers of a large system that integrates a large number of C/C++ modules on the backend, I can tell you that the number of "dynamic" type issues that have leaked into QA (IE beyond automated test cases) are... 0

    The number of null pointer dereferences, linking errors (which end up building successfully, but as soon as you try to call a function crash), and other various segfaults that have been found in the C/C++ modules.. well over 100

    dynamic typing is *easy* to deal with compared to pointer math. Maybe if the C/C++ coders didn't have to spend all their time making sure they were passing char pointers instead of wchar pointers they could have spent a little time bounds checking arrays and verifying pointer math.

    As to all the contentions that python isn't a "real" language, I would say the middle and frontend of this application are much better designed than anything that is in the backend. The code is clean, well documented, easily maintainable, much more flexible, modular, and for the most part 90%+ covered by automated tests. It is a solid OO design with a decent chunk of functional programming thrown in where it makes sense. The C code has a 75 page testing manual that must be run by hand after every QA build (takes 2-3 weeks)... I'm not surprised by this at all, because C requires you to spend all your time making trivial things work, so you don't have any time to actually do design. And once you get something "working" you can't touch it, because nothing is modular and everything is set in stone. I've written a decent amount of C in my life, I'm pretty fluent in it, and in writing python I've had to drop down to C to optimize a number of things. You do it when you have to, just like C coders used to drop to assembly when they had to.

    Sure I'm generalizing in the paragraph above, I'm sure you *can* write well designed C, I've just never seen it in practice in the real world in 15 years of real life experience... I've seen "OK" designed C++, and well designed Java... I can recreate those designs in less than half the code in python, and VS java I'll use 1/10th the RAM, and vs C++ I won't have memory leaks or bad pointer math, and an average developer can read the code.

    I believe Guido is spot on, in my experience the part of the code that has to be fast and isn't already a C module in python is tiny, and most of the time can be built in a day or two. Compare that to the 8 months I'm under budget building these middle and frontend tiers in python (they budgeted based on the last implementation which took 3 years in C++)... And I'd say python is a win, the interface is just as responsive, I'm well within all SLA metrics in the business logic tier, and in a number of places the python implementation is faster than the old C++ (just using better algorithms). I'm going to be at feature parity in the next month with the existing system... well except that now our system is 100% cross platform compatible (tested on OS X, Various linux flavors, Various bsd flavors, and Windows)... Vs the old C++ that made extensive use of win32 only functionality and was 100% windows only. Getting cross platform support was the reason for the redesign/rebuild... The fact that I built a prototype in python faster than the C++ guys could decide on a cross platform GUI toolkit gave my team the win to implement it in python.

  4. Worst idea ever. on The Zuckerberg Tax · · Score: 2, Insightful

    Ok, I'm a middle class person, I have 50k invested in a 401k, said 401k goes up 20% this year... creating a gain of 10k and I get taxed at say 25%.. so I now need to sell $2500 in my retirement account to pay the tax... It gets even crazier if say I'm close to retirement and I have 500-600k or something in said account... now I have a $25000 tax bill on income I didn't make... and I have to sell investments just to pay the tax man... And next year the market could drop 20% and I'll just be out the 25k in taxes plus the 100k in investment losses...

    I thought everyone was agreed we needed to simplify the tax code not make it insanely more complicated.

  5. wow, they send all the data? on Siri Protocol Cracked · · Score: 2

    I knew they were doing some heavy lifting on the server side, cause obviously it doesn't work without a network connection.

    However, I figured they would at least do an initial processing pass on the phone and pass up the data points to the server instead of the raw audio. That at least would make sense, and you'd be able to pass much smaller amounts of data. It would also explain the need to have better hardware on the phone. Sending the raw audio seems insane.

  6. Opportunity cost... in CS at least.. on Why Do So Many College Science Majors Drop Out? · · Score: 1

    Other engineering disciplines are different I know, but in CS, I'd argue opportunity cost is a big factor. Myself and 2 of my classmates dropped out when after our sophomore years we were offered full time positions making real money (well... we were 20, 55k/yr sounded like a lot). This was in post bust 2001, and the three of us had conversations about it and all thought it was crazy to keep paying 10k/year for the next 2 years (or 3 depending on how courses were offered) when we could make 110 or 165k over the same time span... Since then 2 of us have completed our degrees (myself 8 years after dropping out), but I for one don't regret dropping out in the least. I got a lot of experience in those couple years, I learned way more about real software development than I was learning in college, and I've never spent a minute unemployed. My employer luckily has tuition reimbursement, so when I did finish my degree it didn't cost me anything.

    Maybe I've been passed over for jobs/promotions over the years because of my lack of degree, but I've enjoyed my career so far, I love what I'm doing now, and I don't feel like I've been slighted in the least.

  7. Re:Uh... Caching? on New Algorithm Could Substantially Speed Up MRI Scans · · Score: 1

    I didn't read the article... so I don't know, but the summary doesn't say anything about capturing the MRI data, the data is the data... They are using a new process to generate images from said data.

    Now, in the summary, it says they do some up front processing, and then save the result of that, and use it for all subsequent image generation activities... because this processing used to be done on every image generation pass... well guess what, thats the definition of caching, and it has 0 to do with a new algorithm. They are still using the exact same *algorithm* to process the data, they are just storing the part that gets repeated over and over, and using it multiple times...

  8. Re:Not a viable solution on Which OSS Clustered Filesystem Should I Use? · · Score: 1

    I use a Script I found on VMware forums that takes a snapshot and then backs up the snapshot... It's not fool proof but crash consistent at least. Yeah no live migrations...

  9. Re:Not a viable solution on Which OSS Clustered Filesystem Should I Use? · · Score: 1

    I point out that my solution is affordable... How many nics are on your SAN? 15k rpm sas drives are more than twice as expensive as 7200rpm sata. It may well be that the iscsi hardware we were using didn't have the io ops to handle the load but it really felt like a bandwidth issue, Same iscsi San with 10gb vs 1 gb nics performed well enough..

  10. Uh... Caching? on New Algorithm Could Substantially Speed Up MRI Scans · · Score: 2

    Since when is caching a "new" algorithm? From the basic info in the summary it appears this is just a cache of some initial processing that is then reused for subsequent image generation passes...

  11. Not a viable solution on Which OSS Clustered Filesystem Should I Use? · · Score: 3

    If you're looking to have any kind of decent performance in your VMs this just won't work.
    I've worked with VMs on all different kinds of storage (fiber channel SAN, local disk, iSCSI SAN (over 1Gb and 10Gb ethernet), Local hardware raid, NFS file shares, GFS2 (as in the RedHat cluster file system), and MooseFS and GlusterFS) All of these have been either in large test labs or in production cloud deployments. I've never had a cluster file system get close to passing muster as a storage medium for VM usage. IO is the number 1 bottleneck in virtualized environments, and these schemes just add completely unacceptable latency and bandwidth restrictions.

    The only way to really run VMs is fiber channel SAN, local disk (or hardward raid), or iSCSI with 10GbE (on the storage server side). Even iSCSI with 2GbE (2x1GbE bonded) is not speedy enough to support more than 5-10 VMs running concurrently. You'll start to see problems at 5 VMs if the VMs are windows... For whatever reason Windows really likes to write to the disk. Currently I have 4 servers in my basement, a single storage server (6 2TB drives in a raid6, giving 8TB of usable disk) and 3 VM servers (2 2TB drives each, in hardward RAID1). I run the VMs locally and back them up to the storage machine over iSCSI nightly. I also have a shared volume on the storage system that all VMs and my household computers can access. I use openfiler for my storage system, if I had the money it would be nice to get a second storage server and replicate it (which openfiler supports), but I don't have that cash just sitting around right now

    Backing up 8TB of data (ok, so I have about 5TB used), is basically impossible offsite, so we have a "special" folder on the shared drive that is backed up using crashplan, its about 600GB, and the first backup took nearly 3 months over a 5mbps upload.

    The above setup is the only one I've found that is both a) somewhat affordable, and b) performs well enough to do actual work in the VMs. It provides for some mobility in the event of a hardware failure (if a VM server crashes, I can run the crashed VMs via iSCSI on another server (from the day old backup), If the storage server crashes, the only "important" data is the 600GB in the special folder... which would take 2 months to download over my home connection... But could be downloaded in stages, IE get the most important stuff immediately). If both a vm server and the storage server crash, I'm out the VMs that were running on the vm server, but again the important data is off-site, and the VMs can be rebuilt in a day or less.

  12. Re:UEFI and secure boot should NOT be a concern on Australian Users Petitioning Against Windows 8 Secure Boot · · Score: 2

    I really doubt your claim of a 10 fold improvement in security. How many MBR rootkits have you cleaned up in the wild? How many lame malware infections have you seen/cleaned up in the wild (which secure boot won't help 1 iota)? For me those numbers are 0 to about 50,000 in the last 5 years.

    Phishing and hacked websites that dump malware via browser bugs are the 2 biggest security threats I've seen in the last 5 years, and neither of these is even remotely addressed by secure boot, when someone comes up with a key signing scheme to stop phishing I'll listen to a "10 fold improvement" claim, not before.

  13. Re:testing the wrong skill set on Why the New Guy Can't Code · · Score: 1

    The only problem I have with the brain teaser questions is, well I suck at them... I don't like to waste my time solving problems with 0 practical application, I don't have a passion for it... IE a recently posted google interview contained the question "You're shrunk down to 1" tall, and you are in a blender. The blender will turn on in 30 seconds, how do you escape?" Why would I expend any energy trying to solve such a bizarre problem?!? Ask me how I would try to solve the energy crisis, or clean water. At least my answers to those questions might have practical applications.

    Another question which a friend of mine fielded recently in an interview "You have to multiply 10 million random numbers together, your programming language does not have a * operator, how do you do it?"

    The "correct" answer was a ton of loops to duplicate multiplication with addition... Well.. I don't know if thats the fastest/best way to get multiplication, but I'd argue that being able to implement multiplication as addition is probably a completely useless skill, and anyone who immediately comes up with that answer probably doesn't like to use code libraries... Like some code I recently worked with where the developers didn't "trust" SQL so instead of writing joins in SQL, they wrote a bunch of nested loops to "join" tables in code, so they have things that could be accomplished in 1 line of good SQL, that take 20 lines of code and hundreds of hits to the database.

  14. Re:The Real Problem: Degrees Without Side-Work on Why the New Guy Can't Code · · Score: 2

    As a developer who got my first job (and many subsequent ones) based on the strength of my side projects, I have to completely disagree with this mentality. If you're a good developer, you can build good side projects in very few hours. Sure when you first start one, it might consume a few weekends, or mean some late nights, but in general the side projects I take on are in the range of 1-2 weeks of crazy work, and then maybe "Oh it would be nice if it did X, I'll spend 2 hours next week adding that feature".

    It goes back to people claiming a CS degree is a 100% endeavor. While I was in school, most assignments took me a couple hours, and I was generally given 1-2 weeks to complete them. There were some assignments that were more difficult and took 100% effort for the length of the assignment, but only a few. I had plenty of time to build side projects, start a small company with a couple other students, build some custom business apps for clients. during this time I had a life, met my wife, dated her, skied regularly, golfed regularly, travelled some, went to concerts, in short had a life. Today, I still have side projects, I work 40 hour weeks most of the time, sometimes I'll put in extra hours at work when its necessary, and yes, some weeks I'll work 70 hours because I'll have an itch, and decide its time to build something... then 2 or 3 weeks later the itch is scratched, and there is something built that solves at least a small problem, then its back to 40-50 hour weeks like normal, and maybe I spend a couple hours a week for another 2-3 weeks adding a few features, or cleaning up the side project... but it doesn't become a full time job.

  15. Re:Experienced only? on Why the New Guy Can't Code · · Score: 2

    lawyers at least get 0 training in law school about the actual practical practice of law. Lawyering is very much like CS in this regard. The CS curriculum I went through provided 0 real world training in a) source code management, b) software design/engineering (IE how to build maintainable code), c) IDE/Team development, d) continuous integration/build systems.... This is very similar to law school, you learn all the theory of the law, but you don't learn anything useful about how to efficiently file law suits, efficiently prepare documents, manage clients, or their expectations... Without these skills a lawyer is useless in the real world, just as a CS grad is useless without the practical knowledge of the systems I listed, which school does not teach at all (or at least did not 10 years ago maybe things have changed?)

    That is why lawyers spend the first 3-5 years of their careers working 80 hour weeks and making relative peanuts compared to senior lawyers and partners.... I'd bet that is why doctors spend the first years of their careers doing a residency, also making peanuts, and working insane hours. Some things require experience to learn well, software design I feel is one of those things, I'm only just now (6 years into my career) feeling like I can reliably build really maintainable, readable code on the first try. Unless school starts making you build a single project over 4 years, that you have to maintain, and add features to, and build on... that is the only way to learn to build maintainable code... Build a project and maintain it, and figure out "oh, I made a bad decision there... that made it so I had to re-write half the project to add feature X", and learn from that mistake so you make less bad decisions in the future... you just have to have experience with it to learn how to do it. If only companies would implement an apprenticeship/residency/junior associate program that mirrors lawyers/doctors then we'd have something. Burn out the lazy/not dedicated, promote the really good ones quickly, and stop acting like all devs are created equal, cause we're not.

  16. Re:Competitor is .NET on Expensify CEO On 'Why We Won't Hire .NET Developers' · · Score: 1

    are you hiring?

  17. Re:Hmmm ... on CMU Eliminates Object Oriented Programming For Freshman · · Score: 2

    its not compiler optimizations you're missing when you only learn java. Sure java does lots of stuff for you and does the "right thing" most of the time... But it doesn't teach you how things work at a low level. Learning only java doesn't teach you how indexes in a database work, because you just use Java's built in data structures that "just work" and you never have to learn how to manually build a b-tree. Which then teaches you how indexes work, and by deduction why its a bad idea to index every column in a database table. Yes, I once worked in a place full of java only programmers, they had indexed everything in the database to "make it faster" and were then completely confused as to why it wasn't faster. When I explained to them how b-trees (the database indexes were b-trees) worked, and how indexing in a database works in relation to that, they were actually pretty upset that in all the schooling they received no one ever explained this to them. They weren't "dumb" or "bad programmers", they just didn't know what they didn't know, once I explained it, they were very happy, willing to learn, and understand. For a couple of them it really opened their eyes and they'd come ask me questions regularly for the rest of the time I worked there... things like "I've always used java's built in sort functions, but why are they fast?".

    Repeat above story for any sufficiently advanced data structure (linked lists, doubly linked lists, trees, queues, graphs, etc). Having a fundamental understanding of how the data structure works is imperative to being able to understand when its a good idea to use one, and when it will be an epically bad idea to use one. I learned these things in AP CS in high school which when I took it was c++. I "relearned" them again in c++ my freshman year of college, then the college changed to all java.... and I never heard mention of a data structure again, or for that matter an algorithm "Just use javas sort, its faster than anything you'll write"... Data structures and algorithms are still very important in web programming. Just cause you can get those 1.5 million rows out of a database doesn't mean you can effectively deal with that scale in code (much less 100 million or a billion records). I'm sure you can teach data structures and algorithms in java, my experience at a large state university though argues that java makes it too easy to gloss over the details... and so lots of professors will.

  18. Re:Bad Article on Two Huge Holes In the Sun Spotted · · Score: 1

    The space.com article still doesn't say why this is a concern, or even indicate that it is a concern.

    Neither article states whether this is a normal phenomena either... I'd imagine the magnetic field of stars fluctuates, but maybe the solar system is about to lose its power source... I guess we'll see later today?

  19. These articles say the same thing. on Why Nokia Is Toast · · Score: 3, Informative

    Both the "Nokia is dead" and "Nokia will thrive" articles say the same thing. They only differ in whether or not the authors think Nokia will follow the strategy.

    The first article says that Nokia should ditch everything and release 1 really nice WP7 phone. This article says its their only chance, but they won't do it because it is against everything Nokia has ever stood for.

    The second article says they will become the exclusive WP7 shop. Maybe they'll have more than 1 phone, but they'll be the only WP7 game in town, and they'll make really nice integrated phones that provide a slick experience (ala Apple). This is exactly what the first article says they should do, article #2 just says he thinks they will be smart enough to take this route.

  20. Re:This actually kind of makes sense on N.C. Official Sics License Police On Computer Scientist For Too Good a Complaint · · Score: 1

    wow you're deranged. These weren't "blueprints" and nobody signed them saying they were an engineer. It's simple math and reasoning written down in 8 pages. If being able to perform basic math and writing is outlawed, yeah, America is screwed. It's time to get out.

    How does having a legible, well formatted document arguing a position "do the public no good"?!? Public discourse is to be frowned upon?

  21. Totally off topic, but can you actually download 14GB over a dialup modem in 1 month? I could do the math but I'm lazy... just curious.

  22. Re:It's bologna on 'I Just Need a Programmer' · · Score: 1

    Well, I'll agree with you if you're building in java or .net, but you don't only need 1 programmer then, even a trivial java system needs 4-5 developers/IT people to keep everything working. I've worked on extremely small teams (2 or 3 people total, normally 1 or 2 tech people, and 1 business/marketing person), and the technology part has never fallen down because of a lack of an "architect" or "business analyst". (or, I'm really good at all of those roles).

    The only projects I've worked on that I consider failures had all of the above roles, the projects just end up in endless meetings, "design" requirements, and endless change requests. In fact I've rescued two projects personally from complete failure because they had all those roles, and absolutely nothing got done (except the architects took home massive paychecks). Cause the programmer(s) just get pulled in 8 different directions. My last two positions hired me and promptly went from "development teams" of 7 -> 3, and 8 -> 2. And yeah, shortly thereafter the tiny little team devoid of "architects, analysts, or managers" somehow magically delivered working products ahead of schedule and under budget (I'd take the credit, but mostly it was because we ditched java and .net in favor of python).

  23. Re:Legit? on Interpol Issues Wanted Notice For Julian Assange · · Score: 1

    Every "group" experience in my life has been more "high school" than I ever could have guessed... college, my last 3 places of employment, neighbors... it is all still the same lame popularity/fake drama/politics that was high school... I'm pretty sure that we all learned 100% of our social interaction skills by the age of 16, and except for very rare outliers, no one ever progresses beyond that point...

  24. Re:Could be a problem on One Giant Cargo Ship Pollutes As Much As 50M Cars · · Score: 2, Funny

    Swallows can't float though.

  25. Re:this just keeps making my point on TSA Pats Down 3-Year-Old · · Score: 1

    You're right of course :) I added the % and didn't account for it... still a vanishingly small chance...

    And you're correct about the spelling, but poor spelling isn't ruining america so that's immaterial