User:Stormneedle: Difference between revisions
Content added Content deleted
(Created page with '{{mylangbegin|Some languages I know}} {{mylang|ColdFusion|Experienced}} {{mylang|JavaScript|Faded}} {{mylang|MUMPS|Experienced}} {{mylangend}}') |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{mylangbegin|Some languages I know}} |
{{mylangbegin|Some languages I know}} |
||
{{mylang| |
{{mylang|BASIC|uh...}} |
||
{{mylang|C|Faded}} |
|||
{{mylang|ColdFusion|Experienced}}' |
|||
{{mylang|DCL|Faded}} |
|||
{{mylang|JavaScript|Faded}} |
{{mylang|JavaScript|Faded}} |
||
{{mylang|MUMPS|Experienced}} |
{{mylang|MUMPS|Experienced}} |
||
{{mylang|SQL|Moderate}} |
|||
{{mylangend}} |
{{mylangend}} |
||
== Shooting Yourself in the Foot == |
|||
You shoot 583149 AK-47 Teflon-tipped, hollow-point, armor-piercing bullets into even-numbered toes on odd-numbered feet of everyone in the building -- with one line of code. Three weeks later you shoot yourself in the head rather than try to modify that line. |
|||
===Iterative version=== |
|||
<p>You'll have to implement the ^Shoot routine on your own. I'm assuming the count is right rather than checking it, and dispensing only 1 bullet per toe.</p> |
|||
<lang MUMPS>S ^W("AK-47","AMMO")="Teflon-tipped,hollow-point,armor-piercing" F P=$O(^B("")):0:($D(^B(P))#10) F F=$O(^B(P,"")):0:'$D(^B(P,F))#10 F T=$O(^B(P,F,"")):0:('$D(^B(P,F,T))#10) S:('F#2)&(T#2) X=$$SHOOT(^W("AK-47"),^B(P,F,T),1) S P=$O(^B(P)) Q S F=$O(^B(P,F)) Q S T=$O(^B(P,F,T)) Q</lang> |
Latest revision as of 22:15, 30 July 2010
Some languages I know | |
Language | Proficiency |
BASIC | uh... |
C | Faded |
ColdFusion | Experienced' |
DCL | Faded |
JavaScript | Faded |
MUMPS | Experienced |
SQL | Moderate |
Shooting Yourself in the Foot
You shoot 583149 AK-47 Teflon-tipped, hollow-point, armor-piercing bullets into even-numbered toes on odd-numbered feet of everyone in the building -- with one line of code. Three weeks later you shoot yourself in the head rather than try to modify that line.
Iterative version
You'll have to implement the ^Shoot routine on your own. I'm assuming the count is right rather than checking it, and dispensing only 1 bullet per toe.
<lang MUMPS>S ^W("AK-47","AMMO")="Teflon-tipped,hollow-point,armor-piercing" F P=$O(^B("")):0:($D(^B(P))#10) F F=$O(^B(P,"")):0:'$D(^B(P,F))#10 F T=$O(^B(P,F,"")):0:('$D(^B(P,F,T))#10) S:('F#2)&(T#2) X=$$SHOOT(^W("AK-47"),^B(P,F,T),1) S P=$O(^B(P)) Q S F=$O(^B(P,F)) Q S T=$O(^B(P,F,T)) Q</lang>