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,860 other subscribers

Archive for December, 2017

Idera / Embarcadero at least fixed some of their security issues…

Posted by jpluimers on 2017/12/27

Some security improvements

A long while ago I quoted [WayBack] Ideara / Embaracdero is flushing away user trust in their ability to do secure computing… – Jeroen Wiert Pluimers – Google+.

Since then they have fixed some of the issues:

  • EDN password reset email messages do not contain the plain text password any more
  • The https sites now have much better security certificates

Still, parts of their infrastructure run over http or use other insecure patterns.

Infrastructure and DevOps are hard, but an integral aspect of any company.

Hopefully, their most important new-years resolution is to improve on that.

AppAnalytics still down

I don’t hold my breath as [Archive.ishttps://appanalytics.embarcadero.com/ for more than a month now has been showing

503 Service Unavailable

No server is available to handle this request.

On the other hand: they have improved, so let’s keep our fingers crossed, and it had been running since 2015: [WayBack]Embarcadero Introduces AppAnalytics, the First Usage Analytics Service for Desktop, Mobile, and Wearable Applications

Disabling AppAnalytics in Delphi

There are three ways to disable AppAnalytics in the Delphi IDE to phone home (this is for Delphi XE8, change the version numbers accordingly):

That should at least get rid of the 30 second shut-down timeout in some Delphi versions while they try to post the usage data to AppAnalytics (thanks Uwe Raabe for this great tip!)

–jeroen

Related:

Posted in Delphi, Development, Power User, Security, Software Development | 5 Comments »

Valid reasons for having Delphi AnsiString on Mobile platform…not only for Internet but for Shaders also. //…

Posted by jpluimers on 2017/12/27

It’s too bad that you need workarounds to get ByteStrings working on mobile devices as there are APIs there (like shaders) that work best with them.

There was a nice discussion on this last year at [WayBack] I miss AnsiString on Mobile…not only for Internet but for Shaders also.// FMX.Context.GLES.pasconstGLESHeaderHigh: array [0..24] of byte =(Byte(‘p), … – Paul TOTH – Google+ based in this code example in the FMX library undocumented unit FMX.Context.GLES:

// FMX.Context.GLES.pas

const
  GLESHeaderHigh: array [0..24] of byte =
    (Byte('p'), Byte('r'), Byte('e'), Byte('c'), Byte('i'), Byte('s'), Byte('i'), Byte('o'), Byte('n'), Byte(' '),
     Byte('h'), Byte('i'), Byte('g'), Byte('h'), Byte('p'), Byte(' '), Byte(' '), Byte(' '), Byte('f'), Byte('l'),
     Byte('o'), Byte('a'), Byte('t'), Byte(';'), Byte(#13));

There are more than 500 places in the Delphi library sources that uses this construct and even more that do other fiddling (like [WayBackTEncoding.GetBytes) to get from strings to bytes.

I wonder if by now we still need the workarounds that Andreas Hausladen provides:

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Encoding, Event, Software Development | 6 Comments »

c# – Why does Try-Catch require curly braces – Stack Overflow

Posted by jpluimers on 2017/12/27

From my SO Question Archive:

Just curious: Why is the syntax for try catch in C# (Java also?) hard coded for multiple statements? Why doesn’t the language allow:

int i;
string s = DateTime.Now.Seconds % 2 == 1 ? "1" : "not 1";
try
   i = int.Parse(s);
catch
   i = 0;

The example is for trivial purposes only. I know there’s int.TryParse.

[WayBackc# – Why does Try-Catch require curly braces – Stack Overflow.

I asked this question partially because of my Delphi background where there are two try statements (one for finally and one for except a.k.a. catch) neither having the braces problem as try/finally/except all are block boundaries.

The most interesting bit was the [WayBackanswer by [WayBack] Eric Lippert (ex C# compiler team, now at Facebook after an intermediate position at Coverty) referring to his [WayBackWhy are braces required in try-catch-finally? | Fabulous adventures in coding  blog entry.

The answer and blog entry come down to preventing ambiguity.

His answer reveals that a compound try/catch/finally statement is converted by two try statements like this:

try
{
  try
  {
      XYZ();
  }
  catch(whatever)
  {
     DEF();
  }
}
finally
{
  ABC();
}

This emphasises that catch and finally are conceptually indeed two different things which statistics show.

I need to dig up the numbers (I remember researching this for Java and Delphi code a very long time ago – think Delphi 7 era – and C# code a long time ago – think C# 2 era), but this comment should still hold:

My observation in most code I’ve seen is that the combination of catch and finally is hardly (i.e. far less than 1%) used in the same statement (or in other languages in nested statements), because they serve two very different purposes. That’s why I prefer not to mix them, and if I do, use the nested construction to both emphasize the difference in purpose, and execution order. Learning new things every day: How often is your occasionally percentage wise? – Jeroen Wiert Pluimers Dec 23 ’12 at 19:34

–jeroen

Posted in C#, Delphi, Development, Software Development | Leave a Comment »

Maximum filename length 60 characters, le-sigh

Posted by jpluimers on 2017/12/26

It is still better than a maximum password length of 20 characters, but limits like these keep being reason for frustration:

  • : De bestandsnaam, inclusief extensie, mag maximaal 60 tekens lang zijn.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Wasgij Destiny 17 INT ‘Paying the Price! 1000pcs – Jumbo

Posted by jpluimers on 2017/12/26

My mentally retarded brother got himself the below puzzle below. It’s a tad too much complicate for his IQ of ~50 as his ability for relative time is very very limited, so he cannot make most transitions from “then” to “now.

Imagine how the petrol station might look today. The cars will have changed, the fuel will have increased in price, but what about other things? Imagine the differences, and the similarities, between then and now.This is the scene you have to puzzle.

Source: [WayBackWasgij Destiny 17 INT ‘Paying the Price! 1000pcs – Jumbo

Luckily, I found Wasgij destiny 17 – YouTube who had the solution image and mailed it to me.

Now my brother can finish his puzzle: he is so exited!

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Head scratching with a TargetParameterCountException | Software on a String

Posted by jpluimers on 2017/12/26

Ever introduced an extra parameter on a method, tracked all its usages and made the compiler happy by providing a corresponding extra argument in all the calls of that method? Sure you have…

Things like that need a reminder: the joy of reflection and lambdas…

Very good train of thought (and solving!) at [WayBackHead scratching with a TargetParameterCountException | Software on a String

By [WayBackMarjan Venema – Google+

–jeroen

Posted in .NET, C#, Development, Software Development | Leave a Comment »

Some links on multicast networking, Raspberry Pi and DVB USB adapters that help you build a TV server

Posted by jpluimers on 2017/12/26

A cool set of YouTube videos by CWNE88:

The USB device used here is this one:

Tuner is AVerMedia AVerTV Volar Green
There are 2 models, but the good one uses firmware dvb-usb-it9135-02.fw The other one uses dvb-usb-af9035-02.fw but that didn’t seem to work as well and got hot. They look the same on the outside though.
ID 07ca:3835 AVerMedia Technologies, Inc. AVerTV Volar Green HD (A835B)

–jeroen

Posted in Development, Hardware Development, Power User, Raspberry Pi | Leave a Comment »

The fireplace yule Log visualiser in Google Play Music works, but only from web-browser, not from app

Posted by jpluimers on 2017/12/25

Kristian Köhntopp:

Dear Lazyweb, years ago I turned on the Yule log visualiser in GPMAA, Settings, Labs. Current Google music has no Labs. So how do I turn on cover art?

Turns out, the Settings -> Labs switch exists in Desktop Google Music only, and does not (longer) exist in the App.

Sad.

via: [WayBack] Dear Lazyweb… how do I turn on cover art? – Kristian Köhntopp – Google+

The setting is at https://play.google.com/music/listen?authuser&u=0#/accountsettings

More: https://www.youtube.com/watch?v=yYkyOaSNLb8

–jeroen

Posted in Chromecast, Google, Google Play Music, LifeHacker, Power User | Leave a Comment »

seo – How to request Google to re-crawl my website? – Stack Overflow

Posted by jpluimers on 2017/12/25

[WayBackseo – How to request Google to re-crawl my website? – Stack Overflow

TL;DR:

Some links that help you create a sitemap.xml file:

–jeroen

Posted in Google, GoogleSearch, Power User | Leave a Comment »

htop – an interactive process viewer for Unix

Posted by jpluimers on 2017/12/25

Great tool: [WayBackhtop – an interactive process viewer for Unix because it’s both interactive and supports a wide range of OSes: Linux, FreeBSD, OpenBSD and Mac OS X.

Thanks to Warren Postma who suggested it in his comment at [WayBack18 Useful Commands to Get Hardware Information on Linux – Linuxslaves.

Note that on OS X you get this warning after brew install htop :

htop requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.

On Linux you don’t get this message as there you have the /proc file system providing enough information as explained at [WayBackosx – Why does htop on Mac OS X require root privileges to see data for all processes, but on Linux it runs without root – Super User.

A workaround (involving the setuid bit) is at [WayBackRunning htop on Mac OS X needs root. Why?! | Blog | JoeNyland.me or by running visudo ensuring you don’t need a password for it at [WayBackosx – htop isn’t returning CPU or memory usage!? – Super User

–jeroen

 

Posted in *nix, *nix-tools, Apple, BSD, Linux, Mac OS X / OS X / MacOS, macOS 10.12 Sierra, OS X 10.11 El Capitan, OS X 10.9 Mavericks, Power User | Leave a Comment »