<if:Empty $%username>
...
</if:Empty>
That is relatively straight forward - if the username is empty, then run what ever code is between those lines.
This segment stores the value 0 on the computer for use later:
remainingPoints = 0;There are times, however, that code really does resemble my preconceptions. The following code comes from the configuration file of my server:
#appsI wrote it to tidy up the web addresses (URLs) that my users visit.
RewriteRule ^apps/([^/.]+)(?!.)$ $1.sfw.php [L]
#app resources
RewriteRule ^apps/(.*(?=\.).*)$ $1 [L]
Now,
http://www.fractalcanvas.com/apps/iterativecanvasis the same page as
http://www.fractalcanvas.com/iterativecanvas.sfw.phpexcept a much nicer address. In fact, other applications I develop will have similar URLs now, of the form:
http://www.fractalcanvas.com/apps/some_app_name
There is a little insight into what programming really looks like- granted, each of those examples was hand-picked to prove a point. I'll be posting some code segments soon that are more representative of what my project entails.
Istvan.
I really like this idea. While your blog is not about learning a programming language - though technically it is in an indirect way - I as a reader am very intrigued to learn about how the code works and what it does. I look forward to reading more of these!
ReplyDeleteMr. Kirk