Posted by jpluimers on 2017/11/02
[WayBack] A colleague and I was just wondering, why was TypInfo.pas not named TypeInfo.pas? The original theory of 8.3 naming convention doesn’t hold as TypInfo i… – Willo “qbitza” van der Merwe – Google+
Because of collision: though hardly documented in the early Delphi days the standard function TypeInfo has been there forever so System.TypeInfo already takes TypeInfo in the global namespace as the System unit is used by default and doesn’t have a namespace prefix.
One more reason to suffix unit names with a word like Unit.
And one more reason to always get a Delphi version with source code for RTL/VCL/…: it’s an invaluable source for not so well documented things.
The TypInfo name was also from an era when some people hadn’t learned yet dat using abbrvtns is a sin. Ken Thompson has learned [WayBack] spell it with an “e” · golang/go@c90d392 but we’re suck with StrPas, StrUtils, IntToStr and others forever like Unix is stuck with creat(2): [WayBack] creat(2): open/possibly create file/device – Linux man page and [WayBack] history – What did Ken Thompson mean when he said, “I’d spell creat with an ‘e’.” – Unix & Linux Stack Exchange.
–jeroen
References:
Posted in Delphi, Development, Software Development | 3 Comments »
Posted by jpluimers on 2017/11/02
Quoted in full because even 2.5 years later, it’s just too funny:
- Python: What if everything was a dict?
- Java: What if everything was an object?
- JavaScript: What if everything was a dict *and* an object?
- C: What if everything was a pointer?
- APL: What if everything was an array?
- Tcl: What if everything was a string?
- Prolog: What if everything was a term?
- LISP: What if everything was a pair?
- Scheme: What if everything was a function?
- Haskell: What if everything was a monad?
- Assembly: What if everything was a register?
- Coq: What if everything was a type/proposition?
- COBOL: WHAT IF EVERYTHING WAS UPPERCASE?
- C#: What if everything was like Java, but different?
- Ruby: What if everything was monkey patched?
- Pascal: BEGIN What if everything was structured? END
- C++: What if we added everything to the language?
- C++11: What if we forgot to stop adding stuff?
- Rust: What if garbage collection didn’t exist?
- Go: What if we tried designing C a second time?
- Perl: What if shell, sed, and awk were one language?
- Perl6: What if we took the joke too far?
- PHP: What if we wanted to make SQL injection easier?
- VB: What if we wanted to allow anyone to program?
- VB.NET: What if we wanted to stop them again?
- Forth: What if everything was a stack?
- ColorForth: What if the stack was green?
- PostScript: What if everything was printed at 600dpi?
- XSLT: What if everything was an XML element?
- Make: What if everything was a dependency?
- m4: What if everything was incomprehensibly quoted?
- Scala: What if Haskell ran on the JVM?
- Clojure: What if LISP ran on the JVM?
- Lua: What if game developers got tired of C++?
- Mathematica: What if Stephen Wolfram invented everything?
- Malbolge: What if there is no god?
–jeroen
Read the rest of this entry »
Posted in .NET, APL, Assembly Language, BASIC, C, C#, C++, COBOL, Development, EPS/PostScript, Fun, Go (golang), Java, Java Platform, JavaScript/ECMAScript, LISP, Makefile, Pascal, Perl, PHP, Python, Quotes, Ruby, Rust, Scala, Scripting, Smalltalk, Software Development, T-Shirt quotes, TCL, Turbo Prolog, VB.NET, Visual BASIC, XML/XSD, XSLT | Leave a Comment »
Posted by jpluimers on 2017/11/01
Need to research {$DUPLICATEENABLE ON} further one day, but surely looks useful but is not really documented, not even at the Delphi 2009 documentation where it was introduced: [WayBack] SysUtils.pfIgnoreDupUnits Constant.
–jeroen
Via: [WayBack] MonkeyMixer has just been updated!- I’ve fixed a unit naming collision with Castlia- I’ve added an XE7 project group (which includes both the BPL and… – Simon Stuart – Google+
PS:
A cryptic G+ comment [WayBack] by Uwe Schuster:
DUPLICATEENABLE is old, but since it is something for IDE packages to avoid intersections with user/3rd party packages there is no need for a documentation. I do use it in an IDE package that did use the JCL/JVCL units as well and does another unit with a common name. IIRC I did mention it related to MonkeyMixer.
I think he argues that documentation is both not needed, but the usage of the directive sometimes is. Which somehow feels like a contradiction to me.
PS2: via Stefan Glienke, an error message that is related to this:
---------------------------
Error
---------------------------
Cannot load package 'Package2.' It contains unit 'Whatever', which is also contained in package 'Package1'.
---------------------------
OK
---------------------------
Posted in Delphi, Delphi 2009, Delphi 2010, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2017/11/01
Any good English books similar to the German [WayBack] Agiles Coaching by Judith Andresen [Leanpub PDF/iPad/Kindle]?
Although my German reading is quite OK, it’s not OK enough to fully use this book.
–jeroen
via:
Posted in Agile, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2017/10/31
The new [Archive.is] IDE Fix Pack 6.1 released | Andy’s Blog and Tools is huge, especially for Windows 10 targets:
Windows 10 Creators Update 1703 caused issues with all Delphi programs, libraries and packages because it changed how Windows loads imported DLLs in such a way that it causes performance issues and can crash the debugger.
Delphi 10.2 Tokyo Update 2 fixed this by not producing multiple dll import sections for one DLL anymore.
IDE Fix Pack 6.1 implements that “feature” for all previous Delphi versions (2009-10.1 Berlin) and extends it to not only eliminate duplicate dll imports but also duplicate delay dll imports.
There are also (optional) updates that you can enable with new compiler switches:
- Eliminating
fwait instructions (but be careful, as they can confuse the debugger)
- Optimising calls to virtual methods through interfaces
- Optimising certain function prolog code
There are some smaller changes too.
I’m going to try this soon.
–jeroen
Posted in Delphi, Development, Software Development | 2 Comments »
Posted by jpluimers on 2017/10/31
A few tricks to write long strings to files when the Delphi debugger cuts them off (just because they like using 4k buffers internally);
TStringStream.Create(lRequestMessage).SaveToFile('c:\temp\temp.txt')
TIniFile.Create('c:\a.txt').WriteString('a','a',BigStringVar)
TFileStream.Create('c:\a.txt', fmCreate or fmShareDenyNone).WriteBuffer(Pointer(TEncoding.UTF8.GetBytes(BigStringVar))^,Length(TEncoding.UTF8.GetBytes(BigStringVar)))
They all work form the debug inspector, but they do leak memory. See comments below.
Via:
–jeroen
Read the rest of this entry »
Posted in About, Conference Topics, Conferences, Delphi, Development, Encoding, Event, Software Development | 6 Comments »
Posted by jpluimers on 2017/10/30
Android apps make sounds when posting notifications. So adding useless gets you on the blacklist quickly thereby disallowing your app for posting any notifications at all.
Kristian shows how and why at
How to lose notification privilege:
- Use notification for marketing.
- Long press.
- Disable.
It’s that easy. You never force grab my attention for marketing a second time, especially since Android notifications by default come with sound now. This one woke me up.




–jeroen
Posted in Android Devices, Google, Power User | Leave a Comment »