Forum comments in chronological order

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Dec 2018

Linkstar, pagerank peddlers?

Thu 6-Dec-2018 04:08
The owner of a website I look after was recently contacted by them. There were several odd things about the approach offering $200/year for a simple text link and some accompanying text on a particular page. Firstly why would a supposedly UK based company be quoting rates to another UK entity in US dollars (ok I guess they deal with people all over the world so it may make sense to have). More significantly, why would anyone offer that much without even knowing how many visitors the page recieves, obviously they are only really interested in the search engines picking up the link.

Despite my reservations the site owner did pursue it further and recieved the details of the proposed ad and supposed client. The link was to a US based company, which makes no sense for a targeted ad on a UK website, especially one which is specifically targeted at a fairly small local area. In addition the proposed extra paragraph of text to go with the text link had at best a tenuous relevance, and came with a disclaimer that it had been translated from chinese (which showed) and might want ammending slightly. Initial investigation of the site gave no great cause for concern, except it's obvious lack of relevance to users of our site, confirming that it was only really intersted in boosting search engine rankings. Closer inspection however showed that Adblock plus had blocked two items for atdmt, clearly it is this malware that they are actually trying to spread.
I have no idea if the supposed client is aware that their site is being promoted and used in this way.They may be fully aware and complicit, or more likely they have been hacked or may unwittingly just think they have signed up for a site promotion scheme.
Needless to say I have informed my client that I will not even consider allowing this ad to be placed on his website.
Very smart move, ^ and excellent points.
See here:

Linus,the only reason I allowed Javascript to run from [your awesome] site is so I could post a reply here.
(I also checked the page source-code and it looks like the JS is only used for your comment box, search function and page navigation. To me, that's acceptable use of JS. I block all JS by default, and run Request Policy in all my browsers. These two addins stop dead in their tracks almost all known threats and popups, plus it saves me bandwidth - I'm capped.
I despise pages loaded w/ JS.) ;-)

Anytime a company says you can't modify - or even view - the source-code, HTML, or CSS; RUN !
Don't let their code ever touch your page.

Thank you Linus for using some deductive reasoning and saving yourself - and your visitors - a world of headaches.
I just happened across your site today, and would like to say it's pretty cool.
Thank you for putting it up.
I don't bookmark pages, that can be tracked, but I did pull a copy of one page in .maff, so I can find you again. (Hope you don't mind.)

Pretty cool site. :-)


Tue 11-Dec-2018 10:31
Dialog looks interesting, any chance that the source for Tethered will be released?

A case against syntax highlighting

Tue 11-Dec-2018 12:34
I know I'm late to the party, but I liked the article. It's a valuable perspective and critique, and I likewise understand the passion sparked by the argument instead.

Speaking as a non-neurotypical programmer, however, I feel the issue is more nuanced: I'm not sure the proposition is as binary as the article seems to paint it. This is my takeaway of the article, as fairly as I can put it:

* Syntax highlighting wrongly shifts the focus from structure to the building blocks themselves. This causes developers to fixate on form rather than function.
* Syntax highlighting offers a shortcut around proper understanding, until that shortcut no longer works and then the student is effectively stymied.
* Syntax highlighting encourages poor habits, such as the aforementioned skimming.
* Syntax highlighting doesn't help in situations where it would be genuinely beneficial, or at least, does not offer a sturdy enough safety net that you can afford to lean on it.

These points are fair, but I feel they are predicated on the notion that this is all that syntax highlighting can offer, particularly for programmers whose brain architecture and thus cognition may differ from that of the norm. I do not consider myself stupid (although that may be the Dunning-Kruger effect talking), but I do quite often feel stupid when faced with the common tools of the profession. To me, the benefits of syntax highlighting go well beyond simply allowing me to tell the difference between an object and a type. I shall forbear from quoting Dijkstra's observations on phrenology, and instead simply observe that given the choice between expending significant cognitive effort on following code execution and instead using that energy to be more productive, I much prefer the second option.

So what does syntax highlighting give me?

* I have ADHD. In addition, my mind is visually oriented: it uses shapes and colors to attach meaning. The way my brain partitions a program is thus a natural fit for a discreet application of color. That way, I don't have to keep the entire program in my skull (I'm a C++ programmer in a legacy codebase: we have hundreds of 7000+ LOC files that all interact in nonobvious ways, and focusing on all those details is simply unviable). It makes the code structure itself distinct to me, which is a very good help when getting my bearings, and prevents my brain from spinning out of control and overfocusing on the wrong things.
* Similarly, I've occasionally experimented with editors that let me move temporarily irrelevant code out of focus. That is a massive boon for me, because I can still easily see where things are, I'm just not forced to pay attention to them, allowing my brain to assign them a smaller portion of my attention.
* The article appears to cast understanding and skimming as mutually opposing phenomena. I would question that. To the contrary, I believe both are necessary in order to advance: it's part of what makes high-level abstractions (leakiness and all) such a powerful concept. When I look for bugs, a total in-depth understanding of all the code that passes under my eye would be detrimental... and likely take years. Instead, I skim, and while syntax highlighting may encourage skimming, I submit that is so for another reason: because it makes skimming viable and a useful tool for quickly evaluating the gist of a given piece of code. For someone such as I, who read code iteratively, it is a godsend.
* Visual Studio represents code that is defined out in a lighter shade than code that will actually run. I have no idea what I would have done if I hadn't had that feature, but I suspect refactoring would simply not have happened.
* The fact that syntax highlighting doesn't solve several preventable bugs is unfortunate. It does not, however, invalidate the concept itself. All it proves is that syntax highlighting falls short of perfection.

So I think there's value in syntax highlighting. It certainly helps me. However, there's a good case to be made against syntax highlighting as it is. On reflection, I've come to realize that the issue rather resembles the criticism levied against Hungarian notation, and that seems to indicate that the problem isn't so much that syntax can be highlighted but that it's often highlighted in the wrong manner and for the wrong reasons. We generally don't garish colors for all the types and objects and keywords.

But we *can* use it to lace the source with actual meaning, and this is particularly fine if the compiler and editor can use it to dispense with what would otherwise be useless and mentally taxing makework.
Björn Paulsen
Tue 11-Dec-2018 12:39
(The above screed was mine. Unfortunately the login window lapsed.)


Tue 11-Dec-2018 18:44
if I have an object in a closed transparent container how do I override the default 'you can't reach obj' take fail message?

(instead of [take *]) doesn't seem to work in this case (scope?)
Linus Åkesson
Wed 12-Dec-2018 10:35
if I have an object in a closed transparent container how do I override the default 'you can't reach obj' take fail message?

(instead of [take *]) doesn't seem to work in this case (scope?)

The "can't reach" message is printed by (refuse $), which is invoked before instead-of. So you can override refuse with a negated rule:

~(refuse [take *]) %% Don't refuse to take this object.

About me

Björn Paulsen
Wed 12-Dec-2018 11:15

ralph wrote:

That's exactly the problem i have, but how to solve it?

Good question. I find the Internet is to blame for shortening my attention span and making it harder to concentrate on one thing. Gone are the days of reading a book in one sitting. Still, nothing a bit of self-discipline wouldn't fix, I suppose?

When I was younger, I had this idea that you needed enthusiasm to carry a project. I've now come to believe that's wrong. Enthusiasm is fine, but it can't be your foundation, because it's fickle.

So my take on it is this: if you have an idea for some project, don't be afraid to structure it, to ponder it, to build test cases. You may feel as if that kills the magic, but I think that if your enthusiasm for the specific idea is that fragile, then it wouldn't have survived long enough to carry the project to completion anyway.