The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for 2019

Omrekenen van eenheden/Keuken – Wikibooks

Posted by jpluimers on 2019/10/21

Van [WayBackOmrekenen van eenheden/Keuken – Wikibooks omdat ik weer eens van teveel eetlepels naar volume wilde omrekenen:

Omrekenen van veel in de keuken gebruikte eenheden:

dr 1 dr = 0,05 ml druppel
tl 1 tl = 5 ml theelepel
el 1 el = 15 ml eetlepel
kopje 1 kopje = 250 ml
ons 1 ons = 100 gram
pd 1 pond = 500 gram

Afgestreken eetlepels

aardappelmeel 9 g
bakpoeder 7 g
basterdsuiker 12 g
bloem 8 g
boter 14 g
braadvet 12 g
cacao 8 g
griesmeel 9 g
havermout 5 g
krenten 11 g
maïzena 8 g
margarine 14 g
paneermeel 6 g
poedersuiker 9 g
rozijnen 10 g
rijst 13 g
suiker 11 g
zout 15 g

Oventemperatuur

lauwwarm 100 – 150°C
matig warm 150 – 175°C
tamelijk warm 175 – 200°C
warm 200 – 225°C
heet 225 – 275°C
zeer heet boven 275°C

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

AnyDesk remote desktop – on my list of things to test

Posted by jpluimers on 2019/10/21

After getting fed up by TeamViewer for the umptieth time because inter-version compatibility issues, I think I’m going to try this:

[WayBack] AnyDesk Remote Desktop

AnyDesk is the world’s most comfortable remote desktop application. Access all your programs, documents and files from anywhere, without having to entrust your data to a cloud service.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

“Error: Xcode alone is not sufficient on Sierra.”

Posted by jpluimers on 2019/10/21

Once in a while, despite having Xcode, the Xcode command-line tools, homebrew and ruby installed on your Mac OS X / Mac OS / whatever it is called now, you get this on the console:

Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install

Running the commandxcode-select --install makes it even more confusing:

It’s probably Apple trying to tell you “Xcode is out of date”, but they should certainly show that in a more obvious way and redirect to the App Store that does show it:

–jeroen

Posted in Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »

WayBack machine now rate limits your requests and blocks if you go over it

Posted by jpluimers on 2019/10/19

Got this a while ago while saving a bunch of links for my blog; unfortunately the email address did not respond for information

Too Many Requests

We are limiting the number of URLs you can submit to be Archived to the Wayback Machine, using the Save Page Now features, to no more than 15 per minute.

If you submit more than that we will block Save Page Now requests from your IP number for one day.

Please feel free to write to us at info@archive.org if you have questions about this. Please include your IP address and any URLs in the email so we can provide you with better service.

I wish there was a queue service that would make you wait longer, but does fulfill the request.

–jeroen

Posted in Internet, InternetArchive, Power User, WayBack machine | Leave a Comment »

Reminder to politicians: concrete blocks do not help against trucks

Posted by jpluimers on 2019/10/18

These physics lessens at school were useful after all.

TL;DR:

A concrete block of ~1.500kg will loose against a truck of ~9.000kg, especially if that drives 50 km/hour.

It will not stop the truck, but will start moving by itself in unexpected directions and speeds becoming a projectile by itself or worse: usually pieces break off traveling at quite high speed.

The video below shows what happens.

Beton blocks

Over the last year or so, concrete blocks are deployed in many places of the public areas. The usual deeper motivation is to protect against traffic.

The blocks are put on the ground without anchoring for a variety of motivations like flexibility, ease of deployment/removal, cost of blocks (EUR ~100 each) versus anchoring (EUR ~250 per block) in a non-interconnected way.

Often, the rectangular lego-like blocks with 8 bumps are used which come in two varieties: 40cm high (easier to sit on, look more friendly) of a mere 1200kg or 80cm high (look more massive) of only 2400kg.

Other concrete blocks used are roughly the same dimensions, so an average weight of ~1500kg is reasonable.

Trucks

An average truck (at about 10.000 kg) isn’t a static object. In cities they are usually allowed to drive at 50 km/hour, but during assassination attempts they drove much faster and also were much heavier.

Let’s assume however that a truck used is less heavy (not all bad people are smart to get a really heavy truck) at ~9.000kg.

Truck concrete collision

The assumptions so far: a truck of 9.000kg at 50 km/hour against a concrete block of 1.500kg at standstill.

Even though a collision with a truck looses some energy, a moving truck has a lot of it. So most of the energy from the truck will be partially or fully transferred via its momentum to the concrete block(s).

The physics involved here are about momentum:

  • momentum = mass * velocity
  • momentum in a system is conserved

Before colliding, the truck has momentum, but the concrete block does not. After the collision, the momentum is divided over truck and concrete block so they both have a velocity.

A few cases that can happen, usually in a combined fashion:

  1. The truck comes to a full stop and all momentum is transferred to the block. The block now travels 9.000/1.500 * 50 km/h which is 200 km/h if it was in front of the truck.
  2. If the concrete wasn’t fully in front of the truck, the truck will move in another direction as well as the concrete block. Those directions are hard to predict for the public.
  3. Part of the concrete comes off during collision. Since their weight is smaller, their speed will be higher (because momentum is conserved) and direction even less predictable.

–jeroen

References

Read the rest of this entry »

Posted in LifeHacker, Power User, science | Leave a Comment »

Sam Knutson on Twitter: ““Every piece of equipment is shipped from the factory able to successfully complete n power cycles and you only find out n at n+1” Anonymous IBM Customer Engineer (CE)… 

Posted by jpluimers on 2019/10/18

[WayBackSam Knutson on Twitter: ““Every piece of equipment is shipped from the factory able to successfully complete n power cycles and you only find out n at n+1” Anonymous IBM Customer Engineer (CE)… .

I could not track down earlier versions of the image than 2005; see the images below.

Failures

[WayBack] flowcart troubleshooting komputer | superplayboy:

–jeroen

Posted in Hardware, LifeHacker, Power User | Leave a Comment »

Researchers “unblur” images to gain access to Bitcoin wallet. The lesson here…

Posted by jpluimers on 2019/10/18

via: [WayBack] Researchers “unblur” images to gain access to Bitcoin wallet. The lesson here is that blurring sensitive images is no longer safe. – Kevin Powick – Google+:

Background information:

–jeroen

 

Posted in Bitcoin, Cryptocurrency, Power User, Security | Leave a Comment »

My code of conduct – Marcin Juszkiewicz

Posted by jpluimers on 2019/10/17

There are many “code of conduct” documents. Often they differ a lot. I have my own: Do not be an asshole. Respect the others.

Source: [WayBackMy code of conduct – Marcin Juszkiewicz

Via: [WayBack] I like this code of conduct and general remarks. – Jean-Luc Aufranc – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

The Delphi System.Exit “Function”

Posted by jpluimers on 2019/10/17

Still wrongly documented as System.Exit Function [WayBack], most people think it is a statement.

However, it is a compiler intrinsic procedure in the System unit that – when called inside a real function – optionally accepts a parameter with the same type as the encompassing function because it is a compiler intrinsic. It kind of acts as an overloaded procedure, but in fact translate to machine code via an intermediate parse tree.

The parameterless version has been there since at least Turbo Pascal 3.0, but the parameterised version is more recent: I think it was introduced around Delphi 7.

It then stops executing that function after first executing any explicit or implicit finally blocks.

I’ve seen various projects that used their own Exit procedure. This is a very bad habit: Since the System unit is always further away in scope, the introduced one is called which can severely confuse programmers not being aware of this.

The code generation for the parameterless and parameterised  “overloads” of System.Exit is slightly different:

  • The parameterless one can often be optimised away, for instance folding multiple calls to them into one, or rearranging code execution so a jump isn’t needed any more. This means you cannot always put a breakpoint on them.
  • The parameterised one always needs code to load the function result, so you can always put a breakpoint on them.

Stefan Glienke explained the above in [WayBack] The advantage of using Exit() instead of a plain Exit? You can place a breakpoint! – Uwe Raabe – Google+

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »

How to debug small programs

Posted by jpluimers on 2019/10/17

As a follow up of SSCCE, MWE and MCVE are basically the same: provide code people can use to reproduce a problem, I found [WayBackHow to debug small programs which is starts as

One of the most frequent categories of bad questions I see on StackOverflow is: I wrote this program for my assignment and it doesn’t work. [20 lines of code]. And… that’s it.

Then it goes on how to debug those pieces of code, trim them into an SSCCE/MWE/MCVW to form the base of a question which you can ask on StackOverflow/SuperUser/ServerFault/StackExchange, forum, group/community or even your co-worker.

The really cool thing about the techniques used there are that they also apply to bigger pieces of code, heck even large code bases.

They force you to trim down your problem in to manageable pieces that are easy to explain and write concise documentation and tests around them to assist you in the process.

Below are the steps in a short list. Be sure to read the original article How to debug small programs | Fabulous adventures in coding after going through the list.

  1. Turn on compiler warnings, inspect all of them, resolve or explain them
  2. Rubber duck to an imaginary person or even a live one explaining each part in simple terms
  3. If the bug is still there, break up the code into pieces
  4. Write technical specifications for all the pieces
  5. Verify the pieces against the specifications, for instance by adding pre- and postconditions to them
  6. Add assertions in the pieces for all the specifications
  7. Write test cases for the pieces
  8. Write down on paper the expected behaviour for all the lines of code
  9. Use a debugger to step through all the lines of code and verify the expected behaviour you wrote down
  10. While debugging, listen to all your doubts (gut feeling is a good thing!)

This sounds like a lot of work. It is. All good programming is.

If you apply these before writing any logic code, then your life becomes easier because you will spot bugs sooner:

  • specification
  • test cases
  • preconditions
  • postconditions
  • assertions

Does this again sound like a lot of work?

Then remember: taking a shortcut will make the actual work longer. The reason is that hunting for bugs is a tedious and time consuming process scaling very badly with complexity.

–jeroen

Posted in Conference Topics, Conferences, Debugging, Development, Event, Software Development | Leave a Comment »