The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • 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

brew install go in a mac is easy with homebrew

Posted by jpluimers on 2018/06/07

Installing go in one go:

$ brew install go
Updating Homebrew...
...
==> Downloading https://homebrew.bintray.com/bottles/go-1.10.2.sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/48/4823ec642228f0a3746fe490ebd33f935d1c53424638792c20035ce0c3e8281e?__gda__=exp=1525363605~hmac=ff794ae42583750331da7067db58f71993bbe870b5833fc08e79908ed2afcc06&
######################################################################## 100.0%
==> Pouring go-1.10.2.sierra.bottle.tar.gz
==> Caveats
A valid GOPATH is required to use the `go get` command.
If $GOPATH is not specified, $HOME/go will be used by default:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
🍺  /usr/local/Cellar/go/1.10.2: 8,161 files, 336.8MB

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

High DPI Patches For Delphi | The Art of Delphi Programming

Posted by jpluimers on 2018/06/06

Reminder to self to install the [WayBackHigh DPI Patches For Delphi | The Art of Delphi Programming from the [WayBack] download zip.

–jeroen

Via: [WayBack] Some things just need their time: – Uwe Raabe – Google+

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

Our CTO has discovered an incredible way of making developers read his commit messages. You won’t even believe how he did it! | CommitStrip

Posted by jpluimers on 2018/06/06

From a long time ago: [WayBackOur CTO has discovered an incredible way of making developers read his commit messages. You won’t even believe how he did it! | CommitStrip.

It seems others want to improve their commit Click-Through-Ratios as well, in a faint hope to get their pull-requests merged.

[WayBackThibaut Sacreste on Twitter: “I’ve been experimenting with clickbaity pull request headlines at work. CTR’s gone Though. The. Roof!!!… “

Tough luck: in the mean time, developers have learned (:

Via: [WayBack] »I’ve been experimenting with clickbaity pull request headlines at work. CTR’s gone Though. The. Roof!!!« – Kristian Köhntopp – Google+

–jeroen

Read the rest of this entry »

Posted in Development, Fun, Software Development, Source Code Management | Leave a Comment »

Delphi 10.2 Tokyo: they did not fix the broken documentation tab in 10.2.2 2004, but it is an “easy” fix to do yourself

Posted by jpluimers on 2018/06/06

Since the fix is on the forums server (singular!) and that one tends to be squirrel driven lately, here it is in full via [WayBack] I see they didn’t fix the broken documentation tab in 10.2.2 2004 (professional). It’s not a show stopper but a nuisance to fix oneself. And for new dev… – Herbert Sauro – Google+ and [WayBack] I have installed Delphi 10.2.2 and the Documentation tab is all stuffed up ( see picture ). I know there is a html template page for the welcome tab, bu… – Tony Danby – Google+

In C:\Program Files (x86)\Embarcadero\Studio\19.0\Welcomepage\en

Edit Documentation.htm and insert the one piece about the innerWidth

function setFrameURL(url)
        {
            if(url){
                document.getElementById('load_html').src = url
                $("#load_html").css("display", "block");
                var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;         
                $("#load_html").css("height",(height)+"px");    
                var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;         
                $("#load_html").css("width",(width)+"px");  

It works and takes up the entire page after you restart the IDE.

If it gets up: https://forums.embarcadero.com/thread.jspa?threadID=271798

–jeroen

 

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | Leave a Comment »

GitHub – oldcompcz/SpaceAssault: DOS space shooter in ASCII.

Posted by jpluimers on 2018/06/05

Cool [WayBackGitHub – oldcompcz/SpaceAssault: DOS space shooter in ASCII. written in pure C using Turbo C.

You can likely compile this using this:

[WayBack] Turbo C++ or C for Windows 7, 8, 8.1 and 10 32/64-bit Full Screen Free Download – CodePlex Archive

The download is actually a small Windows wrapper around Turbo C++ 3.2: github.com/vineetchoudhary/turbocpp/releases.

Via: [WayBack] Space Assault Game The complete source code of very nice ascii-art invaders is now at GitHub. This game of Roman Hocke won second place in the High-Voltage 2017 competition… – Jaroslav Beran – Google+

–jeroen

Posted in C, Development, History, MS-DOS, Software Development | Leave a Comment »

Delphi versions that can convert .bpg to .groupproj files

Posted by jpluimers on 2018/06/05

Reminder to self: extend the below very incomplete list of Delphi versions that can open a Borland Project Group file with extension .bpg (from the Delphi <= 7 era) and convert it to an XML based Group Project file with extension .grouproj (from the Delphi >= 2007 era).

  • Delphi 2007

Notes:

The .bpg file is actually a makefile, see for instance [WayBackbuild – How to compile a Delphi 7 project group file (.bpg) using the command line? – Stack Overflow

Delphi 2006 and 2005 use .bdsgroup files:

The .bdsgroup files are not compatible with .groupproj files in Delphi 2007 and up: [WayBackdelphi – How to convert a D2009 .groupproj file to a D2006 .bdsgroup file? – Stack Overflow.

A .grouproj file is basically an msbuild 2013 subset, see the below links for more info:

I needed this so I could make this conversion:

–jeroen

PS: Searching for the .groupproj links also got me this: [WayBackParallel compilation of delphi projects through MSBuild – Stack Overflow

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

Field “id” not found, the The Turkish-İ/I/i/ı and case conversion and case folding – Update on the dasBlog Turkish-I bug and a reminder to me on Globalization – Scott Hanselman

Posted by jpluimers on 2018/06/05

Reminder to self: in Turkey, they have more than just the lowercase i and uppercase I. In fact these are the i characters you can get:

Note there are more non-US latin characters in Turkey, see the links below for some lists.

The Turkish case conversion is inside the same group of dotted. The English case conversion is from dotted lowercase i to dotless uppercase I as shown in [WayBackInternationalizing Turkish: Dotted and Dotless Turkish Letter “I”:

English vs. Turkish Case Mappings
Language Letter Lowercase
Map
Uppercase
Map
English i i I
Turkish dotted i i İ
Turkish dotless ı ı I

In general, this problem is called [WayBack] Case Folding and many environments do not have good and ready to use solutions for this.

In my case, I was getting Field "id" not found messages for all tables that had an ID field. The reason was that somewhere in the path from my code to the database, either a comparison or case conversion wasn’t taking into account the above mappings.

Though the underlying database indicates I shouldn’t in [WayBackDo I have to use UPPERCASE identifiers?, it appears that something in the path from my code via IBX to the Firebird 2.5 database has issues on Turkish machines. The good thing: Database WorkBench 5.x doesn’t have that issue for a regular query.

Usually databases are only cases sensitive with quoted identifiers, but not all are: [WayBackLorenzo Alberton – Articles – Database identifiers, quoting and case sensitivity

Read the rest of this entry »

Posted in Development, internatiolanization (i18n) and localization (l10), Software Development | Leave a Comment »

Thread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework […]”

Posted by jpluimers on 2018/06/01

Interesting [Archive.isThread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework […]”

It answers [Archive.is] Thread by @domenic: “Having been out of the scene for over 5 years now, I’m extraordinarily confused by what’s going on over in .NET land. Not only the “what”, b […]”

Dominic was confused by .NET Core going to support Windows desktop UI apps as platform specific packages to a a cross platform foundation as announced in [WayBack] .NET Core 3 and Support for Windows Desktop Applications | .NET Blog

Via: [WayBack] Miguel de Icaza on Twitter: “Good thread on the evolution of modern .NET by @shanselman… “

–jeroen

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

“Unknown function at TMethodImplementationIntercept”

Posted by jpluimers on 2018/06/01

Reminder to self: when you get Unknown function at TMethodImplementationIntercept in a Delphi stack trace from the Exception.StackTrace property or FastMM memory report:

  1. Ensure you generate a .MAP or .TDS file with full debug information
  2. Copy the .MAP or .TDS files to directory of your EXE.

Via:

The Exception.StackTrace was introduced in Delphi 2009 that extended these [WayBackException Members:

Some notes:

  • Fields where you can put hooks in; if there is no hook in place, they won’t be used:
    • [WayBackException.GetExceptionStackInfoProc Field GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
      • This function is called to return an opaque data structure that contains stack information for the given exception information record. This function will be called when the exception is about to be raised or if this is an external exception such as an Access Violation, called soon after the object is created.
    • [WayBackException.CleanUpStackInfoProc Field CleanUpStackInfoProc: procedure (Info: Pointer);
      • This function is called when the destructor is called to clean up any data associated with the given opaque data structure.
    • [WayBackException.GetStackInfoStringProc Field GetStackInfoStringProc: function (Info: Pointer): string;
      • This function is called to return a string representation of the opaque data structure returned by GetExceptionStackInfoProc

TMethodImplementationIntercept was introduced in the System.Rtti unit of Delphi XE6 [WayBack]:

–jeroen

Example code:


unit ExceptionHelperUnit;
interface
uses
System.SysUtils;
type
ExceptionHelper = class helper for Exception
public
function Describe: string;
class procedure RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
class function GetStackTrace: string;
end;
implementation
uses
System.RTLConsts,
System.SysConst;
type
EStackTraceException = class(Exception); // EProgrammerNotFound to make it really clear this is only to be used in very limited places ??
{ ExceptionHelper }
function ExceptionHelper.Describe: string;
var
lStackTrace: string;
begin
Result := inherited ToString();
if Self is EInOutError then
if Result = System.RTLConsts.SInvalidFileName then
Result := System.SysConst.SInvalidFileName;
if Assigned(StackInfo) then
lStackTrace := StackTrace
else
lStackTrace := 'empty';
Result := Format('Exception'#13#10'%s at $%p: %s'#13#10'with StackTrace'#13#10'%s', [ClassName, ExceptAddr, Result, lStackTrace]);
end;
class function ExceptionHelper.GetStackTrace: string;
begin
try
Result := 'Get StackTrace via Exception.';
raise EStackTraceException.Create(Result) at ReturnAddress;
except
on E: EStackTraceException do
Result := E.StackTrace;
end;
end;
class procedure ExceptionHelper.RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
begin
raise ENotImplemented.CreateFmt('Method %s.%s is not implemented.', [aClass.ClassName, aMethodName]);
end;
end.

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

Regex – Does not contain certain Characters – Stack Overflow

Posted by jpluimers on 2018/06/01

I had to find strings containing ” of object”, but not starting with a “)”, so the regex became this:

[^)] of object

Source: [WayBackRegex – Does not contain certain Characters – Stack Overflow

–jeroen

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