Category Archives: Software

On code review

https://debruine.github.io/talks/RIOT-code-review-2022

powered by Advanced iFrame

 

CC-BY-NC Science Surf , accessed 19.09.2026

A R function creating 96 well plate sample assignment

Most recently I had to add forgotten data to a SQL server database that was in use only until 2010. Script language was Cold Fusion at that time creating a visual interface to 96 well plates where proband IDs are assigned to plate positions by drop down fields.

R doesn’t have any good way for formatted data entry. Some shiny apps would be helpful but a bit overkill here. Data export into a javascript framework would be also a more professional solution while I just needed only a quick way to modify my database.

So I came up with some R code producing html code embedding javascript functions that can export the result as SQL code, so a 4 language mixup.

96 well plate assignment
dataentry <- function(plate_id,city) {
# get orig IDs from database first

# position identifier A01, A02...
pos = NULL
for (i in 1:8) {
  pos = c(pos, paste0( rep( LETTERS[i], 12), str_pad( 1:12 ,2,pad="0" ) ) )
}
	
HTML <- paste('<html>
<script>
function download(filename, text) {
  var element = document.createElement("a");
  element.setAttribute("href", "data:text/plain;charset=utf-8," + encodeURIComponent(text));
  element.setAttribute("download", filename);
  element.style.display = "none";
  document.body.appendChild(element);
  element.click();
  document.body.removeChild(element);
}
function saveValues() {
  var frm = document.getElementById("f");
  var params = "";
  var sample_id = ',sample_id,';
  for( var i=0; i<frm.length; i++ ) {
    sample_id++;
    var fieldId = frm.elements[i].id;
    var fieldValue = frm.elements[i].value;
    if (fieldValue) params += "INSERT INTO samples (plate_id,plate_position,patient_id) VALUES (',plate_id,'," + fieldId + "," + fieldValue + ")\\n";
  }
  download("',plate_id,'.SQL",params);
}
</script>
<body>
<form id="f">')
	
# dropdowns
sel ='<option value=""></option>'
for (i in 1:dim(patients)[1]) {
  sel <- paste0(sel,'<option value=',patients[i,"patient_id"],'>',patients[i,"Orig_ID"],'</option>\n')
}
for (i in pos) {
  if (substr(i,2,3) == "01") HTML <- paste0(HTML,'<BR>')
  HTML <- paste(HTML,'<select id=',i,'>',sel,'</select>')
}
	
HTML <- paste(HTML,'</form>
<br><input name="save" type="button" value="SQL" onclick="saveValues(); return false"/>
</body></html>')
	
sink( paste('plate.html') )
cat(HTML)
sink()
}
dataentry(725,'city')

 

CC-BY-NC Science Surf , accessed 19.09.2026

Why lines of code is a bad metric for a programmer

There is a long explanation over at medium

committing code is a small part of what software engineers do. There are many ways in which you can contribute technically without writing much code. In fact, the best senior engineers I know are great at prioritization, delegation, and simplifying. Their pull requests are tiny because they've made the code modular and straightforward. … Writing negative code is a point of pride! If you refactored a complex piece of logic, picked a good library to solve a problem, or eliminated unnecessary features, then you'll have a negative commit history. .. fine-tune configs, research arcane issues, and dive deep into underlying architecture. Working on these jobs can mean days of research just to make a few-line change.

The same applies to amount of funding received by a scientist (although frequently used for calculation of salariy). If I can achieve the same impact at a fraction of the costs, isn’t that much better than producing more costs?

 

CC-BY-NC Science Surf , accessed 19.09.2026

At least one positive advice?

Is there at least one positive advice of all that Musk utterance?

https://archive.ph/TcxaF#selection-1319.0-2987.210
  1. Avoid large meetings
    Large meetings waste valuable time and energy – They discourage debate – People are more guarded than open – There's not enough time for everyone to contribute. Don't schedule large meetings unless you're certain they provide value to everyone.
  2. Leave a meeting if you're not contributing
    If a meeting doesn't require your: – Input – Value – Decisions Your presence is useless. It's not rude to leave a meeting. But it's rude to waste people's time.
  3. Forget the chain of command
    Communicate with colleagues directly. Not through supervisors or managers. Fast communicators make fast decisions. Fast decisions = competitive advantage.
  4. Be clear, not clever
    Avoid nonsense words and technical jargon. It slows down communication. Choose words that are: – Concise – To the point – Easy to understand Don't sound smart. Be efficient.
  5. Ditch frequent meetings
    There's no better way to waste everyone's time. Use meetings to: – Collaborate – Attack issues head-on – Solve urgent problems But once you resolve the issue, frequent meetings are no longer necessary. You can resolve most issues without a meeting. Instead of meetings: – Send a text – Send an email – Communicate on a discord or slack channel Don't interrupt your team's workflow if it's unnecessary.
  6. Use common sense if a company rule doesn't make sense
    Contribute to progress – Apply to your specific situation Avoid following the rule with your eyes closed. Don't follow rules. Follow principles.

Warning : 2) and even other x) only suitable for slightly autistic, self obsessed and excellent scientists.

 

 

 

CC-BY-NC Science Surf , accessed 19.09.2026

Brave new AI science world

AI works well in some areas while results are very mixed or even dangerous in others [1, 2].

But what about AI in generic scientific areas?

I have recently looked at scite.ai, a service that claims to analyze a paper if the references have been supported or contrasted the findings — any references that have been retracted in the meantime or received an expression of concern? While the latter isn’t really a big question, I was not very much impressed by the results as most references could not be classified.

But there are now more companies off the ground. Let’s have a look at some.

One is SciScore

16/11/2022 screenshot https://sciscore.com/index.php#pricing

SciScore claims

SciScore generates three reports and a score for every submission. These materials assist researchers, editors, and funders in improving the quality and reliability of scientific research by automatically reporting detected criteria of interest for future review. Researchers signing up with their ORCID get ten free reports. Reports can take as little as 1 minute!

The next one is Prophy, another reference finder.

16/11/2022 screenshot https://www.prophy.science/

and there is Galactica.

16/11/2022 screenshot https://galactica.org/

and well also copy.ai

28/12/2022 Screenshot https://copy.ai

I have no idea if we really need this kind of stuff – any AI to write my blog even faster?

Also others commented earlier this month that it is “not obviously wrong but wrong in subtle ways”.

28/12/22 Screenshot https://mastodon.social/@tommorris/109460645976102033

Fortunately Copyleaks released now even an AI detector just to fight back…

 

CC-BY-NC Science Surf , accessed 19.09.2026

Katzenjammer II

Seltsam, was gerade auf Twitter los ist wenn wir CT Bergstrom glauben, der eine Team Email von Musk geteilt hat.

putative chief twit email as distributed by CT Bergstrom https://archive.ph/ZNWIN

Es sieht so aus als sei Twitter nun in der Gewalt von einem reichen Mann, der einem pseudoreligiösen Mars Kult angehört – nachzulesen in dem aufschlussreichen Artikel von Dave Troy

This is a reference to "longtermism" the heavily marketed philosophy being promoted by Musk and his friend William MacAskill that asserts the only thing that matters is humanity's future in space, and that the only goal of the living is to maximize the number of future humans alive, as well as the number of artificial intelligence instances that could possibly exist in the future. This mandate is most often used to brush aside calls for improving conditions and alleviating suffering among the living here on Earth now. Because, the theory goes, giving a poor person a blanket isn't likely to be as useful for the future of humanity as building a rocket to Mars. Longtermism is heavily influenced by "Russian Cosmism" and is also directly adjacent to "Effective Altruism." Musk's stated mission, which he intends to fulfill in his lifetime, is to "make humanity a multiplanetary species." The anti-democratic urge in longtermism is rooted in the belief that "mob rule" will lead to nuclear annihilation; we should, Musk thinks, be guided by "wiser" minds.

 

 

 

 

CC-BY-NC Science Surf , accessed 19.09.2026

Surveillance Publisher

Capitalized value? Personalized PDFs? DFG warning? User tracking? Forced marriage? It is incredible how scientific publishers are expanding their business. Here is a new paper

This essay develops the idea of surveillance publishing, with special attention to the example of Elsevier. A scholarly publisher can be defined as a surveillance publisher if it derives a substantial proportion of its revenue from prediction products, fueled by data extracted from researcher behavior. … The products' purpose, moreover, is to streamline the top-down assessment and evaluation practices that have taken hold in recent decades. A final concern is that scholars will internalize an analytics mindset, one already encouraged by citation counts and impact factors.

Sure, this already happens as some committees look only at lists of impact factor and grant sums. In the near future, they will switch to Elsevier`s “human ressources” management system Interfolio to compare candidates.

Founded in 1999, Interfolio supports over 400 higher education institutions, research funders and academic organizations in 25 countries, and over 1.7 million academic professionals and scholars. Theo Pillay, General Manager of Research Institutional Products, Elsevier, said: "Interfolio has a proven track record in supporting the academic community, thanks to its deep understanding of faculty needs, institutional workflows, research assessment and academic careers, combined with its agile technology and experienced leadership.

Back to the original article

the publishing giants have long profited off of academics and our university employers-by packaging scholars' unpaid writing-and-editing labor only to sell it back to us as usuriously priced subscriptions or article processing charges (APCs). That's a lucrative business that Elsevier and the others won't give up. But they're layering another business on top of their legacy publishing operations, in the Clarivate mold. The data trove that publishers are sitting on is, if anything, far richer than the citation graph alone.

Data is the new oil, indeed.

 

CC-BY-NC Science Surf , accessed 19.09.2026

Ein mathematischer Gottesbeweis

Ein mathematischer Gottesbeweis geht zurück auf Guido Grandi und wurde vor kurzem wieder mal ausgegraben von u/Prunestand bzw Cliff Pickover.

0 = 0 + 0 + 0 + ...
  = (1-1) + (1-1) + (1-1) + ...
  = 1 - 1 + 1 - 1 + 1 - 1 + ...
  = 1 + (-1 + 1) + (-1 + 1) + (-1 + 1) + ...
  = 1 + 0 + 0 + 0 + ...
  = 1

was letztendlich einer Schöpfung aus dem Nichts entspricht wo doch eigentlich “nihilo ex nihilum” gilt.

Die Grandi-Reihe hat nur leider keinen Summenwert, weil sie nicht konvergent ist. Anders gesagt

0 + 0 + 0 + ...                          # N Elemente
(1-1) + (1-1) + (1-1) + ...              # 2N Elemente
1 - 1 + 1 - 1 + 1 - 1 + ...              # 2N Elemente
1 + (-1 + 1) + (-1 + 1) + (-1 + 1) + ... # 2N + 1 Elemente
1 + 0 + 0 + 0 + ...                      # N + 1 Elemente

dh die 4. Zeile enthält eine falsche Aussage.

Frustriert oder erleichtert? Auf arXiv geht es weiter mit Gödels Gottesbeweis.

 

CC-BY-NC Science Surf , accessed 19.09.2026

increasing complication

Another famous article from the past: P. W. Anderson “More is different” 50 years ago

… the next stage could be hierarchy or specialization of function, or both. At some point we have to stop talking about decreasing symmetry and start calling it increasing complication. Thus, with increasing complication at each stage, we go up on the hierarchy of the sciences. We expect to encounter fascinating and, I believe, very fundamental questions at each stage in fitting together less complicated pieces into a more complicated system and understanding the basically new types of behavior which can result.

 

CC-BY-NC Science Surf , accessed 19.09.2026