Editors Note: The pipe symbol (|) delimits lines, to get around the lameness filter.
[Opening Scene. Mr Mitnick stands before Mr Painter. In the background, various prisoners work the salt mines.]
HARDWARE HACKER PRISONER The sun is strong | It's hot as hell below
COLLEGE MP3 PIRATE PRISONER Look down, look down, | There's twenty years to go
ENCRYPTION PROFESSOR PRISONER I've done no wrong! | Sweet Jesus, hear my prayer!
COLLEGE STUDENTS Look down look down, | Sweet Jesus doesn't care
MR. PAINTER Now bring me prisoner 24601 | Your time is up | And your parole's begun | You know what that means.
MR. MITNICK Yes, it means I'm free.
MR. PAINTER No! | It means you get | Your yellow ticket-of-leave | You are a hacker
MR. MITNICK I made an unpaid call.
MR. PAINTER You stole from a company!
MR. MITNICK I broke a phone security. | The security system was close to death | And we were starving.
MR. PAINTER You will starve again | Unless you learn the meaning of the law.
MR. MITNICK I know the meaning of those 6 years | A slave of the law
MR. PAINTER Five years for what you did | The rest because you tried to run | Yes, 24601.
MR. MITNICK From here I am done!
MR. PAINTER I am Chris Painter | Do not forget my name! | Do not forget me, | 24601.
[The musical continues as Mr Painter tries to prevent the eventually successful Mr Mitnick from working as a security consultant.
As the years pass, unstability and unrest forment within the country. The coorporate elite patents everything in sight. Copyrights are retroactively passed to include anything written at any time, to last for the next millennium. Many servers are hacked, and the hackers executed publicly, but the holes are not patched: discussing, learning, or exploring possible security flaws are considered breaches of the EDMCA law.
A large body of rebellion starts to grow. Mr Painter and Mr Mitnick get caught in the unrest. After a fierce legal battle where Mr Painter uses his servers as honeypots, Mr Painter is left unconscious after a severe security violation. Mr Mitnick, unsure of what to do, fights off the script kiddies from killing Mr Painter and his servers.
As Mr Painter regains consciousness, Mr Mitnick panics and flees back to his home server, cossette.fontaine.gnu.org.]
MR. PAINTER Who is this man? | What sort of hacker is he To have my data caught in a trap | And choose to let it go free? It was his hour at last | To put a seal on my port Wipe out the FAT | And make eggdrop and fork! All it would take | Was a bit of his byte. Vengeance was his | And he gave me back my site!
Damned if I'll live in the debt of a thief! | Damned if I'll yield at the end of the chase. | I am the Law and the Law is not mocked | I'll spit his pity right back in his face | There is nothing on earth that we share | It is either Mitnick or Painter!
[Painter rips out his cable model, and throws it into a ditch.
More stuff happens, including advanced AI, which automates the legal battles and keeps the webservers up to date. Cossette.fontaine.gnu.org sings and servers webpages as Mitnick dies of old age. Mitnick journeys to heaven with all the other coders, intellectuals, and college students, to a brave gnu world.]
Exceptions are meant to handle exceptional situations. As defined in the Python Reference Manual:
Exceptions are a means of breaking out of the normal flow of control of a code block in order to handle errors or other exceptional conditions.
Errors tend to be the most common exceptional condition that programmers run into. Exceptions allow you to write the inner code as if everything will work. But, exceptions are supposed to be able handle any exceptional condition.
In the nested while cases above, the FinishLoop exception should only occur very infrequently -- once per entering the whole loop structure, and then only if the while conditions don't fail. The penalities of occassionally raising an exception are not that bad under Python.
Should you return later, and add another inner loop (either a for-loop or another while loop), then it's quite obvious that the exception will still take you entirely out of the nested loops. Under your PHP example, all your continue statements would have to be adjusted to the correct nesting level. It might be easy to overlook one, possibly causing obscure bugs.
Ah good. I though I had lost all my registry information when my computer last crashed. I hate having to lookup registry keys and reset settings. Now I know I just need to e-mail Microsoft for them.
Microsoft? I need the registries for someone who is listed as John P. Meezly under Office, Cathy A. Ray, and someone who goes by the handle Scuzzlebug when they write their e-mail. Oh, and someone who had a working copy of Photoshop (versions 6 or 7, don't care). AMD processors on Asus motherboards only, please.
Not everyone lives within such easy distances. In Socorro, NM, it's about 70 miles to Albuquerque. Toys'R'Us has a prescence there, but not in Los Lunas (55 miles) or Belen (45 miles). They finally put in a Walmart in Belen a few years ago, so we're not completely isolate.
Of course, travelling those distances goes much faster than the more crowded parts of the US. 70 miles in about 1 hour. Still, I *despise* driving, as it's a boring waste of time. Not to mention the risk of breakdown superhot temperatures in the summer. There's several stretches that require a hike of a few miles to get to any house or building. Thank goodness for cell phones.
Back on topic, online ordering makes most trips to Albuquerque un-necessary. Online ordering is most convienant to those people who would either have to mail-order, or live in reasonably remote areas. There's a lot of us around in the south-west.
Perl excels at text processing in part because Perl excels at regular expressions. They are part of the language, instead of a tacked-on library interface. It is easier to extract arbitrarily formatted text using Perl, while other languages have a more difficult time, since the regular expressions don't come naturally in them.
XML has a regular, structured format. It is easily parsed, but almost no one parses it directly. They use a model which represents the data, usually some form of DOM or SAX. Libraries are present in most languages. The need to rely heavily on regular expressions isn't there, and it allows people to choose other languages without paying a huge development penalty.
Not that there isn't a development penalty, but the penalty is mostly same as developing under that language normally. Developing in C will generally take more time than in, say, Perl, Tcl, or Python, because of low-level issues that the other languages don't have. The resulting code, though, isn't necessarily uglier or different in structure.
There are lots of pages on Perl and XML (check google if you don't believe me), but it just seems that Perl doesn't have the overwhelming advantage on other languages on this subject. That's not to say it isn't useful. But if I were to do XML processing, I probably wouldn't be using Perl.
Unless it was to process nasty, arbitrarily formated text into XML.
If you really want your Perl script to be write only, use "chmod 0333 myScript.perl". Nifty language that is constantly coaxing you to the dark side, begging you to give in to your inner desires, to write code that will rip the sanity from those who look at it!
At work, both Windows and Linux get used. Our customers have both Windows and unices, so that's what we write programs for.
At home, I use Linux whenever I want to program stuff. The sheer availability of tools, the joy of all the different languages available... therein lies nerdvana. And most distributions provide so many wonderful toys, hundreds of apps that you've probably never heard of.
Windows gets used primarily for games at home. Why not use a dedicated console for games? The kinds of games on the console tend not to be the same type as released for the PC, and the PC games can be modified. How many consoles was "Fallout 2" ported to? How about using your own models in your FPS? Downloading someone else's level? Heck, using a Neverwinter Nights module that someone wrote?
It doesn't help that the controllers necessarily influence the games themselves. With the PC, I can choose between various kinds of joysticks, mice, and driving wheels, and still get the benefit of having a keyboard. FPS's and RTS's suck on gamepad style controllers. My personal preference is a mouse/keyboard combo.
Sure, your TV is bigger than your monitor. Still, I sit closer to the monitor, and the picture is many times clearer.
....
Hmm, guilty pleasure #4322. Using your own songs and StepMania on your PC. Screw the DDR Imports, they don't have PWEI's Def Con One.
....
Yep -- anyone can throw together a web page, even my grandparents. But how is my grandmother supposed to be make 3D web page? Why would she want to?
Why a 3D web? A 2D layout works for most everything. Print media uses it, with the odd smeary hologram being the exception. It's much easier to manipulate and organize.
There's several problems with a 3D web:
It's hard to make. There won't be many 3D pages. Why do I want this if I have to spend a lot of time for a little bit of result? That doesn't look good if I'm not an artist? I can do layout, but not modelling, texturing, etc.
You'd have to rely on a wide range of capabities. Slow to fast, custom gaming rigs to business machines with crappy 3D capabilities. It would be difficult to produce nice-looking 3D with the capability to degrade gracefully.
You'd have to create compelling content that is prohibitive under 2D. How many weblogs need 3D support to tell their stories? How many news sites need 3D to show what has happened? What does 3D get you that a well-designed 2D site doesn't? There are purposes for 3D, but the vast majority of web sites would not benefit.
Seperation of content from presentation. In 3D, content is in presentation. This violates a prime concept for the web. How do people with disabilities get information from your 3D page?
And that's not even looking into the issue with interfaces with a 3D page.
Or the complaints you'd get from all the 486/Pentium linux users complaining that it takes too long to render/use (even after lynx has 3d support...;)
Interviewer: Hello, welcome to AmeriCorp, Incorporated Against Enemies of AmeriCorp.
Interviewee: Hi. As you can see from my resume, I've had experience in several large, successful projects, and I feel I can bring-
Interviewer: We already know what you can bring. Our programming analysis shows that you'd be an excellent mailroom boy.
Interviewee: a positive sense of... what?
Interviewer: Our programming analysis shows that you enjoy FauX network programming, and also the "Man" show. We can't have an obvious sexist pig in a position of authority.
Interviewee: But.. I have a sixteen year-old son, and he watches on my TV sometimes, so we can watch as a family.
Interviewer: Plus, our records show that you have browsed goatse.cx repeatedly.
Interviewee: Oh.. I'll kill the brat for using my login.
Interviewer: Hmm, tendency toward domestic violence, how typical. Anyway, mailroom boy is probably the safest position for you here.
"
... enabling effective, secure communication between professionals and users for the first time in the history of the Internet.... The goal of RegistryPro is to build out a gated community for professionals on the Internet"
Ooo! They're going to set the Internet back 10 years! Back when it was professional academic types and none of these unprofessional commercial people!
Let's get started by dismantling the WWW and returning to gopher and archie. (That's the text versions, you GUI people are gonna bring down the COMMUNE-ity here.) That ought to help us build a properly gated community to keep out everyone.
Uhm, what? Money as a gated community? Hah! It'll never work!
Well, according to the honeynet page, it's a program of some sort. To quote, "the binary in question was downloaded, installed, and then ran on the compromised honeypot."
Given this information, you'd probably want to be careful about running the binary. It was used on a infiltrated honeypot. Some suggestions about dealing with this project:
Don't run it on a work machine! Should be obvious.
If it's not your personal machine and you intend to run it, make sure that the owner is aware of possible consequences and has given full permission.
Don't run it on a critical machine. If it's a rootkit of some sort, or something more insidious, you don't want it destroying data. Preferably, you'd like the option to wipe the partition(s) and reinstall if it's nasty.
I don't think the honeypot project would release a very dangerous file without some kind of warning. Still, a little precaution wouldn't hurt.
Editors Note: The pipe symbol (|) delimits lines, to get around the lameness filter.
[Opening Scene. Mr Mitnick stands before Mr Painter. In the background, various prisoners work the salt mines.]
HARDWARE HACKER PRISONER
The sun is strong | It's hot as hell below
COLLEGE MP3 PIRATE PRISONER
Look down, look down, | There's twenty years to go
ENCRYPTION PROFESSOR PRISONER
I've done no wrong! | Sweet Jesus, hear my prayer!
COLLEGE STUDENTS
Look down look down, | Sweet Jesus doesn't care
MR. PAINTER
Now bring me prisoner 24601 | Your time is up | And your parole's begun | You know what that means.
MR. MITNICK
Yes, it means I'm free.
MR. PAINTER
No! | It means you get | Your yellow ticket-of-leave | You are a hacker
MR. MITNICK
I made an unpaid call.
MR. PAINTER
You stole from a company!
MR. MITNICK
I broke a phone security. | The security system was close to death | And we were starving.
MR. PAINTER
You will starve again | Unless you learn the meaning of the law.
MR. MITNICK
I know the meaning of those 6 years | A slave of the law
MR. PAINTER
Five years for what you did | The rest because you tried to run | Yes, 24601.
MR. MITNICK
From here I am done!
MR. PAINTER
I am Chris Painter | Do not forget my name! | Do not forget me, | 24601.
[The musical continues as Mr Painter tries to prevent the eventually successful Mr Mitnick from working as a security consultant.
As the years pass, unstability and unrest forment within the country. The coorporate elite patents everything in sight. Copyrights are retroactively passed to include anything written at any time, to last for the next millennium. Many servers are hacked, and the hackers executed publicly, but the holes are not patched: discussing, learning, or exploring possible security flaws are considered breaches of the EDMCA law.
A large body of rebellion starts to grow. Mr Painter and Mr Mitnick get caught in the unrest. After a fierce legal battle where Mr Painter uses his servers as honeypots, Mr Painter is left unconscious after a severe security violation. Mr Mitnick, unsure of what to do, fights off the script kiddies from killing Mr Painter and his servers.
As Mr Painter regains consciousness, Mr Mitnick panics and flees back to his home server, cossette.fontaine.gnu.org.]
MR. PAINTER
Who is this man? | What sort of hacker is he
To have my data caught in a trap | And choose to let it go free?
It was his hour at last | To put a seal on my port
Wipe out the FAT | And make eggdrop and fork!
All it would take | Was a bit of his byte.
Vengeance was his | And he gave me back my site!
Damned if I'll live in the debt of a thief! | Damned if I'll yield at the end of the chase. | I am the Law and the Law is not mocked | I'll spit his pity right back in his face | There is nothing on earth that we share | It is either Mitnick or Painter!
[Painter rips out his cable model, and throws it into a ditch.
More stuff happens, including advanced AI, which automates the legal battles and keeps the webservers up to date. Cossette.fontaine.gnu.org sings and servers webpages as Mitnick dies of old age. Mitnick journeys to heaven with all the other coders, intellectuals, and college students, to a brave gnu world.]
[Close of curtain.]
In the nested while cases above, the FinishLoop exception should only occur very infrequently -- once per entering the whole loop structure, and then only if the while conditions don't fail. The penalities of occassionally raising an exception are not that bad under Python.
Should you return later, and add another inner loop (either a for-loop or another while loop), then it's quite obvious that the exception will still take you entirely out of the nested loops. Under your PHP example, all your continue statements would have to be adjusted to the correct nesting level. It might be easy to overlook one, possibly causing obscure bugs.
Ah good. I though I had lost all my registry information when my computer last crashed. I hate having to lookup registry keys and reset settings. Now I know I just need to e-mail Microsoft for them.
Microsoft? I need the registries for someone who is listed as John P. Meezly under Office, Cathy A. Ray, and someone who goes by the handle Scuzzlebug when they write their e-mail. Oh, and someone who had a working copy of Photoshop (versions 6 or 7, don't care). AMD processors on Asus motherboards only, please.
That should do it...
Not everyone lives within such easy distances. In Socorro, NM, it's about 70 miles to Albuquerque. Toys'R'Us has a prescence there, but not in Los Lunas (55 miles) or Belen (45 miles). They finally put in a Walmart in Belen a few years ago, so we're not completely isolate.
Of course, travelling those distances goes much faster than the more crowded parts of the US. 70 miles in about 1 hour. Still, I *despise* driving, as it's a boring waste of time. Not to mention the risk of breakdown superhot temperatures in the summer. There's several stretches that require a hike of a few miles to get to any house or building. Thank goodness for cell phones.
Back on topic, online ordering makes most trips to Albuquerque un-necessary. Online ordering is most convienant to those people who would either have to mail-order, or live in reasonably remote areas. There's a lot of us around in the south-west.
Perl excels at text processing in part because Perl excels at regular expressions. They are part of the language, instead of a tacked-on library interface. It is easier to extract arbitrarily formatted text using Perl, while other languages have a more difficult time, since the regular expressions don't come naturally in them.
XML has a regular, structured format. It is easily parsed, but almost no one parses it directly. They use a model which represents the data, usually some form of DOM or SAX. Libraries are present in most languages. The need to rely heavily on regular expressions isn't there, and it allows people to choose other languages without paying a huge development penalty.
Not that there isn't a development penalty, but the penalty is mostly same as developing under that language normally. Developing in C will generally take more time than in, say, Perl, Tcl, or Python, because of low-level issues that the other languages don't have. The resulting code, though, isn't necessarily uglier or different in structure.
There are lots of pages on Perl and XML (check google if you don't believe me), but it just seems that Perl doesn't have the overwhelming advantage on other languages on this subject. That's not to say it isn't useful. But if I were to do XML processing, I probably wouldn't be using Perl.
Unless it was to process nasty, arbitrarily formated text into XML.
If you really want your Perl script to be write only, use "chmod 0333 myScript.perl". Nifty language that is constantly coaxing you to the dark side, begging you to give in to your inner desires, to write code that will rip the sanity from those who look at it!
At work, both Windows and Linux get used. Our customers have both Windows and unices, so that's what we write programs for.
At home, I use Linux whenever I want to program stuff. The sheer availability of tools, the joy of all the different languages available... therein lies nerdvana. And most distributions provide so many wonderful toys, hundreds of apps that you've probably never heard of.
Windows gets used primarily for games at home. Why not use a dedicated console for games? The kinds of games on the console tend not to be the same type as released for the PC, and the PC games can be modified. How many consoles was "Fallout 2" ported to? How about using your own models in your FPS? Downloading someone else's level? Heck, using a Neverwinter Nights module that someone wrote?
It doesn't help that the controllers necessarily influence the games themselves. With the PC, I can choose between various kinds of joysticks, mice, and driving wheels, and still get the benefit of having a keyboard. FPS's and RTS's suck on gamepad style controllers. My personal preference is a mouse/keyboard combo.
Sure, your TV is bigger than your monitor. Still, I sit closer to the monitor, and the picture is many times clearer.
Hmm, guilty pleasure #4322. Using your own songs and StepMania on your PC. Screw the DDR Imports, they don't have PWEI's Def Con One.
....
Why a 3D web? A 2D layout works for most everything. Print media uses it, with the odd smeary hologram being the exception. It's much easier to manipulate and organize.
There's several problems with a 3D web:
And that's not even looking into the issue with interfaces with a 3D page.
Or the complaints you'd get from all the 486/Pentium linux users complaining that it takes too long to render/use (even after lynx has 3d support... ;)
Interviewer: Hello, welcome to AmeriCorp, Incorporated Against Enemies of AmeriCorp.
Interviewee: Hi. As you can see from my resume, I've had experience in several large, successful projects, and I feel I can bring-
Interviewer: We already know what you can bring. Our programming analysis shows that you'd be an excellent mailroom boy.
Interviewee: a positive sense of... what?
Interviewer: Our programming analysis shows that you enjoy FauX network programming, and also the "Man" show. We can't have an obvious sexist pig in a position of authority.
Interviewee: But.. I have a sixteen year-old son, and he watches on my TV sometimes, so we can watch as a family.
Interviewer: Plus, our records show that you have browsed goatse.cx repeatedly.
Interviewee: Oh.. I'll kill the brat for using my login.
Interviewer: Hmm, tendency toward domestic violence, how typical. Anyway, mailroom boy is probably the safest position for you here.
Let's get started by dismantling the WWW and returning to gopher and archie. (That's the text versions, you GUI people are gonna bring down the COMMUNE-ity here.) That ought to help us build a properly gated community to keep out everyone.
Uhm, what? Money as a gated community? Hah! It'll never work!
- Don't run it on a work machine! Should be obvious.
- If it's not your personal machine and you intend to run it, make sure that the owner is aware of possible consequences and has given full permission.
- Don't run it on a critical machine. If it's a rootkit of some sort, or something more insidious, you don't want it destroying data. Preferably, you'd like the option to wipe the partition(s) and reinstall if it's nasty.
I don't think the honeypot project would release a very dangerous file without some kind of warning. Still, a little precaution wouldn't hurt.Reminds me of the various posters in the background of the movie "Brazil":
"Suspicion Breeds Confidance"
and
"Don't Suspect Your Friends -- Report Them!"