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

Archive for the ‘Software Development’ Category

HTTP protocol requires you to escape spaces (usually with %20 or with +), but web-browsers will do that for you

Posted by jpluimers on 2014/02/20

Since the time that spaces are allowed in path and file names, it has caused confusion.

I personally like the readability of  spaces, but still tend to avoid them as they usually cause more harm than the readability gains.

An interesting thread about spaces in file names is operating systems – What technical reasons exist for not using space characters in file names? – Super User.

In URLs, you there are various kinds of places where spaces can be used. You have to escape as Xah Lee wonders in does HTTP protocol require space be encoded in file path?.

The escaping is part of the URL Encoding, but the escapes depends on the position of the space. In the query part (after the first ?), you can have it escaped by both %20 and plus sign, but in the path part (before the first ? sign), it can only have a %20.

This is explained by bobince in urlencode – when to encode space to plus (+) and when to %20? – Stack Overflow.

That escaping basically makes path and file names a lot less readable when passed as a URL. It causes posts like these:

But why can you still use spaces when you type a URL in your web browser, or use it in a href, src or other HTML URL attribute?

Xah Lee rightfully earlier wondered about that in webserver – space in url; did browser got smarter or server? – Stack Overflow.

Technically, both are not allowed. But web browser manufacturers understand we humans are lazy, and accommodate for that by encoding these when putting them into the HTTP request.

You can type “https://www.google.com/search?q=foo bar” in your web browser, and depending on the browser, it gets translated into either one of these:

Recap:

  • encode spaces in URLs as %20
  • try to avoid spaces in path and filenames

–jeroen

via:

Posted in Development, Encoding, HTML, Software Development, URL Encoding, Web Development | Leave a Comment »

XanaNews word-wrap / NNTP text settings

Posted by jpluimers on 2014/02/19

These XanaNews settings are here:

Tools — Options — Posting Settings — Maximum Line Length=72

also

Text Format=NNTP

–jeroen

via Re: xananews – dumb question….

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

Delphi: `with` dos and dont’s (more of the latter though).

Posted by jpluimers on 2014/02/18

About a year ago, I wrote about Delphi: you should avoid the with statement as it makes your code less future proof. Then I already tweeted I would follow up. Time to do it now (:

Besides my first post, these links inspired me most:

Posts about the with statement usually cause a stir: people either like or dislike it with passion.

Starting with some history and examples, this posts lists a few DOs and DON’Ts when using the with statement, shows advantages and drawbacks, and shows you tools to eliminate with statements. Read the rest of this entry »

Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal, With statement | 9 Comments »

When the VideoCast Sample App on Android does not detect cast device (via: Stack Overflow)

Posted by jpluimers on 2014/02/16

Quite a few things to check when the VideoCast Sample App on Android does not detect cast device – Stack Overflow.

–jeroen

Posted in Android, Android Devices, Development, Mobile Development, Power User, Software Development | Leave a Comment »

Happy 80th birthday Niklaus Wirth!

Posted by jpluimers on 2014/02/15

Today, Niklaus Wirth, “father” of The Pascal Programming Language turned 80.

Happy birthday!

–jeroen

Posted in Delphi, Development, Pascal, Software Development, Standard Pascal | Leave a Comment »

Google Play Services 4.2 versions I saw in the wild on Android

Posted by jpluimers on 2014/02/14

Now that the Google Play Services 4.2 have been rolled out to enough Android devices, and the Google Play Services Library version 15 is out, this is my list of Play Services 4.2 versions I have seen in the wild:

  • 4.2.34
  • 4.2.39 (997510-038)
  • 4.2.42 (1013934-034)

Sorry, I didn’t note the build number for 4.2.34.

Anyone that can help complete this list?

–jeroen

Posted in Android, Development, Mobile Development, Software Development | Tagged: , | Leave a Comment »

Genymotion (formerly AndroVM) is an Android x86 virtual machine appliance (via: install in VMware Player/Workstation – YouTube)

Posted by jpluimers on 2014/02/14

Very interesting: Install AndroVM in VMware Player/Workstation – YouTube.

The successor is Genymotion “the faster Android emulator”, and seems to have an easier installation path: Run Android on Your Desktop With Genymotion Android Emulator.

One of the drawbacks of going native: the Delphi for Android compiler currently only generates ARM Android code, otherwise this would be a great way to test your apps.

But it works fine if you use Java, Oxygene for Java or MonoDroid: much faster than the emulator (which you cannot run in a VM at all).

There seems to be a way to install ARM translation, so I need to check that out: android – How to install google play service in the genymotion (ubuntu 13.04) .Currently it doesn’t have drag and drop suport – Stack Overflow.

–jeroen

via: Koushik Dutta – Google+ – Even if Microsoft is considering supporting Android apps on….

Posted in .NET, Android, Android Devices, Delphi, Delphi XE5, Development, Mobile Development, Mono for Android, Power User, Software Development | Tagged: , | 4 Comments »

Google Cast SDK for Android Released: The Google Play services library (revision 15)

Posted by jpluimers on 2014/02/13

Thanks Leon Nicholls – Google+. and Android Developers – Google+ for sharing these two posts: Read the rest of this entry »

Posted in Android, Android Devices, Chrome, Chromecast, Development, Google, Mobile Development, Power User, Software Development | Leave a Comment »

ManagedSpy now maintained by ForNeVeR (via: managed – What happened to ManagedSpy?)

Posted by jpluimers on 2014/02/13

ForNeVeR now maintains ManagedSpy, see his answer on StackOverflow

BTW, I’ve cloned the original ManagedSpy source code and maintaining the code today (for example, ported it to .NET4).

See project on GitHub.

–jeroen

via: managed – What happened to ManagedSpy? – Stack Overflow.

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

Do not share DCU files between projects (via: delphi – Compiler Directive IF and IFEND – Stack Overflow)

Posted by jpluimers on 2014/02/13

Summary: Always try to avoid sharing .DCU files between projects.

I see a lot of projects at clients that do not have their individual DCU directories set (therefore having the DCU files in the same directory as the PAS files causing shared units to share the DCU files), or share DCU files among different projects.

Both are a very bad idea, as the compiler does not always understand when the DCU file does not match the combination of PAS file and compiler options.

The result is the occasional use of the DCU file in stead of the PAS file causing wrong code to be used, or wrong debugger information to be included.

Danny Thorpe phrased it on Stack Overflow: Read the rest of this entry »

Posted in Borland Pascal, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, FreePascal, Lazarus, Pascal, Turbo Pascal | 9 Comments »