Colossus Cipher Challenge Winner On Ada 168
An anonymous reader writes "Colossus Cipher Challenge winner Joachim Schueth talks about why he settled on Ada as his language of choice to unravel a code transmitted from the Heinz Nixdorf Museum in Germany, from a Lorenz SZ42 Cipher machine (used by the German High Command to relay secret messages during the World War II). 'Ada allowed me to concisely express the algorithms I wanted to implement.'"
Re:Let the raging tardfight commence (Score:5, Insightful)
ADA being a government/military based languge I am not to suprised that it won the competition decifering a goverment/military code. (it is more complex then that)
Re:Type Casting (Score:2, Insightful)
"typename(variable)" is pretty easy in my opinion...
(not much harder than the type cast in other languages: "(typename)variable")
Ada even has a package called Ada.Unchecked_Conversion if you don't care
about ensuring the result is within the bounds of the target type...
Re:Let the raging tardfight commence (Score:2, Insightful)
Re:Type Casting (Score:2, Insightful)
Programmer not langauge. (Score:1, Insightful)
The programmer won the competition; not the language. He just happened to write it in Ada. Languages are nothing but syntax: none are "better" than anther at certain operations. Folks here /. apparently never learned that in school.
Concise??!! (Score:3, Insightful)
Constricted - maybe. Painful - most certainly.
You couldn't BE more wrong (Score:5, Insightful)
First off those strict rules help you because you spend miles less time debugging stuff you don't understand, once it compiles it will tend to run and the compiler gives helpful messages about what you are doing wrong (often including suggestions on how to fix it). With Java, and especially C and C++, let alone scripting languages the beginner spends much more time debugging non-operational code than writing the code in the first place. This tends to mean that these people focus on "getting an executable" rather than "getting it running".
Ada is a brilliant language to teach newbies in (again I've personally done this) as you can explain the abstract concepts and then have the compiler make sure they are doing it right rather than have them say "it compiles but it keeps falling over, why?".
Ada's issues are due to the mentality of lots of (IMO) unprofessional engineers who focus on the number of characters over the operational viability of a system.
And for a final point. Take a look at the complex code the guy wrote, if that was in Java, C, C++, Scala, Ruby, Perl, LISP or what ever do you think that you'd have a chance of understanding it?
Re:Let the raging tardfight commence (Score:3, Insightful)
couldn't participate in "real time", but I used the
copies of the sent ciphertexts on the Bletchley
website.
I worked away on a lorenz breaker for the SZ42 stuff, written in C. I was able to break
ciphertext roughly an order of magnitude faster
than Joachims code. Joachim worked away on his code
for several weeks in advance of the contest. I had only a couple of days notice.
I think two things matter in a competition like
this:
o The *appropriateness* of the language
o The skills of the coder
Joachim got all the glory on this one, since he
was first to announce the breaks. But there are
probably a number of others who were "close"
when Joachim announced his break.
Re:Let the raging tardfight commence (Score:1, Insightful)
Re:other factors often dominate language choice (Score:5, Insightful)
This problem, however is a completely different kind of programming. It's old school stuff: building everything you need yourself to run on really slow hardware. And hardware is always slow relative to crypto problems. Ever try to implement RSA encryption from scratch? I have. There's a reason the public key stuff is only used for key exchange.
I think the usefulness of Ada on this kind of problem is related to the issue of testing being costly. When I started in this business, compiling and linking a two hundred line program took about fifteen minutes. Something like unit testing would have been utterly impractical. So a strictly typed language was for nearly everyone a good idea.
Over the last couple of years, I've been trying my hand at a number of difficult algorithmic problems. This is not the stuff that 99% of the programmers in the world do professionally, including me.
Working on these problems was like programming was in the old days. Not only was it just you and the problem with no frameworks to come between, every output becomes a milestone when it takes a program days to generate. It also means that the style of programming is different. You don't worry so much about language restrictions introducing frictional losses into the code/test/recode cycle. You do worry more about mistakes that make it past the compiler.
Ada's philosophy is that coding should be, if not exactly slower certainly more deliberate. If you are running something for which your hardware is monumentally slow, then this is a good style to work in.
Re: ADA Resurgence? (Score:3, Insightful)
We should expect software to work correctly, and take our business elsewhere when it doesn't.
No one dies if your kitchen faucet squirts the water out sideways, but we don't just shrug it off and live with it.
Re: Concise??!! (Score:3, Insightful)
Not concise in spelling out the details of some low-level module, but very concise for higher-level programming, because it made you be precise when implementing the components.
Once you've worked in an area for several years you end up with a good collection of libraries with clean interfaces, and you find yourself throwing very complex programs together with simple code that "just works", rather than the spaghettied jazzturbation that you usually see when people use other languages.
No reason you can't write clean complex programs in the language of your choice; it's just that Ada won't let you be a slouch. It makes you do the details right, but once you've done that you can forget the details and deal with concepts instead.
Admittedly, I used it at the hobbyist level for several years before I realized how to do that.