We roll into our new neighbourhood cautiously guided by an old-timer, who after we finally manage to maneuver into our RV site, introduces himself as Graham. “Been here since the park first opened,” he beams and then proceeds to point to each of the other trailers and run down who’s who: “The ones behind you […]
syntax highlighting is meant to make it easier to read and manage code. its not intended as training wheels, but a tool for professionals and students alike.
i find it draws attention away– if only a small amount of it– from what im trying to do. there are also at least two problems with syntax highlighting, regarding the colours chosen: first, that the parts of syntax that need the brightest or most vibrant colours (that draw the most attention) follow the same logic for everyone. just for a random example, in the picture above the items in red– a colour used for “stop” and “warning” because it gets the most attention– are the tag names, and the equals sign. a more useful scheme to me would be if = was one colour, and == was a different colour (to make assignment vs comparison easier to spot.)
its different for every person. i dont need the tag names in red– theyre already marked with a chevron to the left. thats what im looking for to find tag names. yes, red certainly makes it easier to find the tags (or equals signs) but the whole time im coding, those tags now try to pull me away from the rest of the code. its not worth the tradeoff.
the other problem with colours chosen is that at any given time, what im really looking for in code is a specific group of things, and it changes based on context. so while im looking for whatever it is that im looking for, (it might not even be syntax) ive got all this colourful noise in the text im searching through. now picture a needle in a haystack: do you want to look for that silver needle in a bale of ordinary blonde hay, or would it be easier if the hay were eight or nine different colours?
i find highlighting very useful for search results– especially multiple results displayed at once:
but i only use the search feature if a quick look over the page doesnt suffice, and syntax highlighting only gets the way.
im inclined to think that syntax highlighting is something a lot of people just “put up with” because its there, and its “too much bother” to turn off. (most people hate configuring anything in general, unless they need to and they cant.) and im sure its useful at least for most of the people that make it a feature in the editors theyre writing. it would be funny if that werent the case– if everyone thought that everyone else preferred highlighting, so developers that didnt want or need it assumed they had to add it for the users, while users assumed there was benefit (because why else have the feature?)
its even possible that syntax highlighting is a fad, but im sure a lot of people either love it, or think they do. i gravitate towards editors that dont have it, and i will turn it off if i have to.
- license: creative commons cc0 1.0 (public domain)
today i found a particularly charming new entry about “hello world.” i will quote parts of it here and direct you to the original: -> https://lambdashirehotpot.wordpress.com/2017/05/05/hello-world/
“The ubiquitous introduction to a language, the purpose of the hello, world program is to get the user up and running in an environment, prove that their system is working and provide a taste of its syntax and philosophy.”
alright! so lets do fig. fig tries to be the easiest practical language to learn, topping even basic. (basic has an incredible history, is pretty much the first computer language designed to be learned by everyone– logo is the second– and it has few things about it that are worth improving for an educational language. but there are some, and fig does try.)
how to do hello world in fig?
thats great. but we want it to say hello world:
ok, now weve set the variable hello to the string “world” but we want the string to be “hello world”:
now “hello world”
the “now” almost could be anything:
x “hello world”
p “hello world”
helloworld “hello world”
englebert_humperdinck “hello world”
the goal of hello world is to put it on the screen. we therefore add the print command:
now “hello world” print
now for a “lambdashire hotpot”-style analysis of this example: (loved the “‘armless” bit, lh.)
“It’s terse, requires no unnecessary boilerplate and gets straight to the point, which tends to be true of the language in general.”
i think fig works nicely here, though it does require that most lines begin with a variable. on the other hand, fig doesnt require parentheses to print.
“But let’s take a look at some of the implicit assumptions made here:”
“The python executable needs to be available in our environment, and if it wasn’t initially, then we needed to run a simple installer or take a trip to the system’s package manager.”
at least as much is true for fig.
“We need to understand the process of the call-response mechanism that command line interfaces use in order to enter the print command and interpret its output.”
there is an equivalent of this for fig.
“We must be competent in text entry via, perhaps, a keyboard.”
“This can run on a device somewhere that we have access to, maybe a desktop PC.”
“We are fluent enough in written English to understand that ‘print’ is a verb and ‘Hello, world!’ is an object. And that the quotation marks in the construct ‘some words’ draws on the metaphor of someone speaking.”
well, fig goes left-to-right a little more often.
“At some point we need to able to take some of this for granted,”
“So let’s try taking a look at the concepts presented in the program itself that the user will be expected to understand or learn”
“The pattern name(argument) is a statement indicating that the command name will be invoked with the given argument.”
fig is less explicit in this regard (a huge no-no in python. but fig isnt always like python.) the pattern is left-to-right and new variables are on the left, except for block commands.
“The symbol print is to be interpreted as an atom, in this case an identifier representing a named command, which is implicitly always available to the user.”
same here– though the first part is the variable, the second (in this case) is the string it gets set to, and then what to do with it follows after it is set.
in most languages, the function has to point to the object. but by following chronologically, the object is associated implicitly. (again frowned upon in python. but i think both designs have their own merits.)
“The symbol ‘Hello, world!’ is also to be interpreted as an atom, in this case a string of characters in which whitespace does not act as a separator.”
“Defining string literals is likewise always available to the user as part of the language.”
indeed, a string literal in fig is either a function parameter, or it overwrites (sets) the default 0 value of a new variable.
“The act of entering a newline causes the command to be evaluated and run.”
the act of entering a newline indicates a new line (and very likely a new variable also.)
“The double-quotes are not included in the output, so there is some difference between the representation of the underlying string and the format of the glyphs that form the output.”
also the same in fig, as well as many other languages.
“the action of printing to the console occurs as a ‘side effect’ – something that cannot be expressed in the language directly.”
hmm, i think ive conflated “state” with “side effect” for too long. is there any sort of i/o that doesnt qualify as a “side effect?” (not a rhetorical question.)
“That’s actually quite a cognitive load! And we’ve not even got into other ‘simple’ concepts such as numbers, variables, sequential execution, conditional execution, loops, and function definition…”
well, youve overexplained it. but i enjoyed it. fig was designed specifically around the concepts of:
* variables * input * output * basic math * loops * conditionals * functions
lets find out how that matches your excellent list:
(y) sequential execution (well it does go left-to-right)
(y) conditional execution
(y) loops, and
(y) function definition…
“It’s very easy to forget how hard the first few steps can be, and Python is one of the simpler entry points.”
i agree. i coded in basic for a quarter century, and spent years looking for the best “21st century basic” dialect. i settled on python, and also used python to write fig.
i believe im also your first follower– i hope you enjoy this platform, and write more.
Welcome! This is a blog about programming. And what better way to begin a blog about programming than with a clichéd post about Hello World? The ubiquitous introduction to a language, the purpose of the hello, world program is to get the user up and running in an environment, prove that their system is working and provide a taste of its syntax and philosophy. So let’s see what we can learn about some contemporary languages from how they present us with this allegedly straightforward task. Today, it’s the turn of everyone’s ‘armless snaky friend, Python.
Hello world in Python is simple, right?
It’s terse, requires no unnecessary boilerplate and gets straight to the point, which tends to be true of the language in general. Excellent. We are encouraged to run it in an interactive mode to begin with, so let’s do so.
Like I said, simple! But let’s take a look…
View original post 532 more words
this one is for connie. (who is not one of these people at all.)
i dont like the bossy happy people that have sprouted up. they dont just want everyone to be happy– they demand it. and if they cant demand youre happy, they demand you act like youre happy. or just go away.
but really, f*** that. mandatory positivity isnt just fascist, its mediocre.
in the old days, well-meaning people tried to cheer you up. they werent pushy about it, they didnt feel entitled to you putting a happy face on for them. (well, maybe your parents did. your friends didnt.) they might offer you a hug, or do some other nice thing for you. thats real charity– you dont owe them anything in return. you dont have to feel better if you dont.
this new happiness offers so little. it just demands people put on a show. this is a new sort of entitlement that has crept into popular culture during my lifetime, though perhaps some people felt it in the 70s and 80s. it even reminds me a little of certain cults that require people to either be happy, or pretend to be. some of it i believe can be traced directly to cults.
but whats different about it is that you used to be able to leave that sort of thing just by walking away from whatever group of people really believed that crap. and now, its like they arent in their own little groups and subcultures anymore. theyve gone mainstream, thats the real change. theyre everywhere. there could be bossy happy people right around the corner, lurking!
you know what? im not offended by your smile. if its real, let it shine. if its fake, i want to get away. if you expect me to fake it just so i can stand here, why dont YOU go away? but have yourself a *lovely* little day.
- license: creative commons cc0 1.0 (public domain)
a warning: this post begins with a request that is entirely hypocritical. i run a forum for gnu/linux, but it is rarely used and probably close to pointless.
im completely fed up with the gnu/linux community. for all the problems that gnu/linux has (its still better than windows) its nothing compared to its communities.
i think two words sums them all up perfectly:
the “friendliest” community i dare not name, as they troll the internet stalking all critics, and never leave them alone. they constantly drive their developers further and further from the support forums, to the point where the developers hide and/or are accused of doing things in secret (which is entirely untrue, incidentally. they are just trying to work in peace without the throngs of wankers.)
a caveat: i only get to know the forums dedicated to “easy” distros or minimal ones. all the fancy stuff: gentoo, lfs, pentest distros, firmware replacements– they might all be really nice people.
and of course, individuals. you can find those anywhere. on the “very friendly” distro forums, i spent half my time talking to nice people in pm. posting publically was absolutely pointless, everyone had their own ideas for applications and questions and tips and howtos, and i had mine, though i couldnt get past the “new breed” of fanboy. i was a regular from a decade ago, but i refused to say which one, and no one guessed.
the debian community was just getting over years of being “like ubuntu, except unfriendly” when it decided to unleash douchebag+ init on all its users. now the word that sums up debian is “presumptuous.” not only does it make terrible choices for defaults, but its fans gloat month after month that soon you wont have choices (because why should you?) debian has abandoned its mission, and made gnome, red hat and microsoft higher priorities.
i doubt i will ever go back to the devuan community. it has all the charm of a trip to the dentist, though i still like steve litt (its ok if it isnt mutual, steve. youve always a fan in me) and the author of refracta is always good people, for the record. 95% of that community is brilliant, but the other 5 is enough to keep me away from refracta.
then theres open source– the group of corporate fanboys that co-opted the free software movement, so microsoft could join. they constantly slander free software supporters, but i suppose thats the cost of critiquing something that is pretty extremely dishonest to begin with. cmon guys, even osi-co-founder (and author of the debian free software guidelines) bruce perens had to leave and write a letter about how open-source had lost its way and become cynical. since then its only gotten worse.
i would compare the ubuntu forums to a cult, but i dont want to be unfair to cults. its mostly a cult of personality where if you dont like the design decisions of their great leader, which always drag users through years of things they dont want, are told in short: “get with it, or go pound sand,” and then the things that cost those users are invariably abandoned a few years later (ubuntu edge, mir, unity, upstart– perhaps shuttleworth is more like john scully than his obvious idol steve jobs.)
but ubuntu is not about community— the community is about shuttleworth, and the whole thing tastes corporate. well lets be fair– its startup culture for a startup company thats been trying to pivot for more than a decade now. perhaps walesopedia and shubuntu have a similar nature.
twitter is the same– you either get bullies and trolls or you get pseudo-fascists that try in vain to fight them though at least do a great job of making it hostile to (even the most obvious examples of) free speech. and speaking of fascism, lets not even talk about facebook.
then there are the libre-people. you know, politically we have the most in common, but in terms of execution, theyre pretty much like you cant do that on televisions firing squad leader, who occasionally steps in front of the condemned before yelling “fire!”
while they talk about the value of coding and automation, they take forever to find volunteers to customize things by hand, so you can do your part for free software– by running outdated versions of things that someone finally got around to removing the non-free parts of.
except linux-libre. i mean, at least thats mostly automated and up to date, but debian still has its own similar kernel (for now at least.)
anyway, love the idea, but with so little priority given to updates, most of this stuff is a lost cause– albeit one that always matters. the point of engaging with a community like that– i got tired of the double standard about documentation (the gnu fdl is not libre! nor is it dfsg compatible) and left for debian. (oops.)
wherever you go, its the “face” of community. the face, but not more. insiders are happy, some people get free tech support, everyone else is going to get crapped on. all of which is fine, unless you for some reason wanted a community.
with unlimited examples of how pointless it is, trying to find community in these so-called communities, you might wonder exactly what i want from them? well the old “sjw” trick never works, i dont think we need 5 more codes-of-conduct to argue about until someone finally pulls rank and plays favourites, so im not asking them for heavier policing or stricter rules.
basically, i give up. its been close enough to 15 years, and im completely fed up with all of you, everywhere. ive tried. im not interested anymore.
i still have the pleasure of dealing with individuals, who make using gnu/linux a less lonely endeavor. very recently i gave someone im teaching a free laptop, and we installed my own fig os distro on it. but i doubt fig os will ever have a “community” online, and if it did, it would probably suck like the others do. because gnu/linux communities just suck. hard. at least every one ive ever been to.
i did go to a lug, just once. a guy let me play with his xo-1 laptop (awesome!) and there was a pretty boring (but informative) talk about btrfs, or something like it. but i didnt find any douchebags at that meeting, and the chance to use an xo-1 was totally worth the trip. also, ive been to a lug meeting.
my advice if you ever feel the way i do is to join a forum, make a handful of friends, and get the hell out of there before it gets completely stupid, and the stupidity gets in your face. because it always will, unless you kiss the right arses or have nothing to say. get a few friends and tell the rest of the world “thanks for the software– love to stay and chat, but i have a colonoscopy id rather go to.”
results may vary, naturally.
- license: creative commons cc0 1.0 (public domain)
im of the opinion that only one of these approaches is “truly scientific,” but its useful to look at all of them, if only for the purpose of debate or clarification.
the first approach to examine is “fringe science.” if youve been accused of it, please dont turn away yet. you may not know where im going with this. what i consider “fringe science” is when people are too focused on the questions of science, and throw out any answers that go against whatever answers they are most excited about. everyone has this attitude to some degree, and a science ought to temper it. people who engage in fringe science have the answers they want, and are only interested in the possibilities that will prove them right.
at the opposite end, you have the scientific orthodoxy. rooted in academia, scientific orthodoxy is intended to “weed out” everything fringe, everything unsupported, everything unproven. at this level, it can keep science “pure.” what i consider “scientific orthodoxy” is when people are too focused on the answers of science, and are not very interested in questions that go to new (or undeveloped) places in our knowledge. if fringe science is like impressionist painting, then orthodoxy is like a digital telescope– it can go so far, at great resolution, but it has no imagination to fuel new theories so much as showcase what it knows.
fringe science has too little in the way of discipline or serious study, while orthodoxy is uncreative and doesnt want to advance without following the great orthodoxy. i believe both of these attitudes are real and unscientific; the first thing the orthodoxy does with brilliant new ideas is throw them out on the street, and the first thing the fringe does is explain why the new idea “proves” all theyve ever said before.
but then you have the truly brilliant scientific minds, which are tempered by scientific practice and also incredibly creative. no “genius” is perfect, and the best science makes mistakes (and learns from them.) the hallmark of a true scientist is an open mind, and also an honest thirst for knowledge and for understanding things as close to accurately as possible. science is not “getting the answer right” but “finding answers.” and that means looking for them, not the mere recital of facts.
people who speak of science tend to lean towards orthodoxy or lean towards the fringe. that seems to satisfy most people, so perhaps 60 or more percent of people that use the word “science” are happy with a fringe or orthodox attitude. but a smaller percentage of people care about both the questions and the answers– these to me are the “true scientists” of the world. of course you can point out that the phrase “true scientist” is itself a fallacy– thats fine, but we can probably agree that science at least has a useful definition; and by extension, definitions that fall short of useful.
scientists are explorers, but they are also navigators. they dont merely set out, but use the world around them to find out where they are. they dont just invent claims, they also try them out rigorously. they dont just try out claims and dispute things, but they also come up with ideas (fueled by both knowledge and imagination.) and they dont mock creative thinking, because they rely on it themselves.
which isnt to say that “fringe science” doesnt exist, but its the stuffed-shirt orthodoxy that talks about it as much as anyone, as if creativity is something that should be stamped out rather than channeled through a more scientific process. getting everyone else to shut up about their ideas is a true hallmark of orthodoxy, not of science.
- license: creative commons cc0 1.0 (public domain)