Delphi and 3rd party tools keep some of the settings in your %AppData% directory. Much more convenient than the registry as they are easier to read and modify when needed (also easier to damage <g>). We’ll start with an overview where various versions of Delphi store their configuration files, then show how the Favourites on the Welcome Page are stored, then end with an overview of BDS, Company Names and Product Names. Read the rest of this entry »
Archive for the ‘Development’ Category
Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page
Posted by jpluimers on 2014/10/14
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, History, Software Development | 4 Comments »
Version control: branches, tags, merging, the folder you work in. Some SVN links.
Posted by jpluimers on 2014/10/09
When using any version control system, understanding which idiom you should follow to do proper branching, merging, tagging, etc is key to your process, and the most difficult thing to get a feel for.
For me, the most confusing part is that branches, tags, and the trunk are directories (both on your development system and the SVN server), and it is hard to see which local directory is switched to what remote one.
As soon as I understood that this was the most confusing aspect for me, I could focus on it and handle it much better.
For SVN (and TortoiseSVN), these links proved to be very valuable for me: Read the rest of this entry »
Posted in Development, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »
The CD pseudo environment variable in batch file: do not overwrite it with a real one!
Posted by jpluimers on 2014/10/08
I never realized you could overwrite the CD pseudo environment variable. If you do, the automatic value of the pseudo variable will not be udpated any more:
You have at some point set the CD variable explicitly. If you do this it will no longer automatically reflect the current working directory. To undo this, set it to empty:
set CD=
Thanks Jonathan and … for explaining this in both your answers.
Thanks to another answer by Endoro I now also know of the %=C:% pseudo variable (you have one per drive letter) that indicate the current directory per drive letter.
–jeroen
via: batch file – When is the CD environment variable updated? – Stack Overflow.
Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 2 Comments »
Delphi: RandomizeIfNeeded
Posted by jpluimers on 2014/10/07
Calling Randomize too often can make your Random numbers even less random.
Sometimes having the Randomize call in a unit initialization section is not practical.
Hence this little method that I think I first wrote back in the Turbo Pascal days:
procedure RandomizeIfNeeded();
begin
if RandSeed = 0 then
Randomize();
end;
–jeroen
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal | 7 Comments »
Great answer on “windows – What encoding/code page is cmd.exe using” (via: Stack Overflow)
Posted by jpluimers on 2014/10/06
I just found this [Wayback] great answer (which by now regrettably is deleted; the previous Wayback link still has it) by [Wayback] Јοеу a.k.a. Johannes Rössel on [Wayback] What encoding/code page is cmd.exe using.
The whole answer is worth reading, so I won’t quote only some bits.
Edit 20210609: the answer now has been replaced by an even more detailed answer [Wayback] by [Wayback] andrewdotn. Also recommended reading. The summary of the new answer is this:
The moral of the story?
typecan print UTF-16LE files with a BOM regardless of your current codepage- Win32 programs can be programmed to output Unicode to the console, using
WriteConsoleW.- Other programs which set the codepage and adjust their output encoding accordingly can print Unicode on the console regardless of what the codepage was when the program started
- For everything else you will have to mess around with
chcp, and will probably still get weird output.
–jeroen
via: windows – What encoding/code page is cmd.exe using – Stack Overflow.
Posted in Batch-Files, Development, Encoding, Power User, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »
Some cool visual traceroute sites/mashups
Posted by jpluimers on 2014/10/02
It is always cool to see some mashups: apart from great examples, they also make for some good research material.
- Traceroute.V – CodeFromThe70s.org.
(next to JavaScript, it also requires Java. An explanation how it works reveals it is using a quite old IP->geolocation DB) - Email graphic traceroute.
(parses email headers to traceroute the SMTP route the email took) - Insert an url (example: www.parsec.it) and locate where the server is (webserver, mailserver,…) on Google Maps.
(Whereis translates an IP address or DNS address to a geolocation on Google maps) - Google Maps Hacks.
(uses the Whereis to map the output of a traceroute/tracert command into a Google map) - IP Address Lookup, Reverse IP Lookup and RBL Lookup.
(maps IP address or DNS address to Google maps) - Visual Trace Route Tool – Find, Track, and Map the Route to an IP Address.
(traces either from the server, or through a proxy)
–jeroen
Posted in Development, Google, GoogleMaps, Power User, Software Development, Web Development | Leave a Comment »
NTCore: interesting site about about system internals and software security
Posted by jpluimers on 2014/09/30
I recently bumped into the NTCore website by Daniel Pisti.
At a client without my own VMs, I wanted to create a DebugBreak like function in Delphi, which I remembered from my Turbo Pascal days to be something like Inline($CC). So searching for both Delphi and INT 3, I found an EXE injection page at NTCore.
In Delphi, you can do this with a procedure like this, which cannot be inlined because it has an asm block:
procedure DebugBreak();
asm
int 3
end;(Reminder to self: sort out what to do here to break on an iOS device; Xcode has an alternative)
The site has information about system internals and software security posted as articles until 2009, when he switched to blog posts. Besides that, he has written a bunch of interesting articles at CodeProject. Read the rest of this entry »
Posted in Delphi, Development, Pascal, Power User, Software Development, Turbo Pascal, Windows, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
bash vulnerability; patch your *n*x boxes A.S.A.P. (via: CERT/NIST reveal level 10 bash alert today, 24 September 2014)
Posted by jpluimers on 2014/09/25
Unpatched bash allows for remote code execution.
Patch as soon as you can and be aware that the current patches might not be complete.
Many vendors (including Debian, Red Hat, SuSE, Ubuntu) already have patches available: CERT/NIST reveal level 10 bash alert today, 24 September 2014.
This is a long article which explains the why/how/… and has an easy check to see if you are vulnerable: What is the CVE-2014-6271 bash vulnerability and, how do I fix it.
It looks like the current patches aren’t complete yet, but do plug big parts of the hole.
Watch bash CVEs in Ubuntu and CVE-2014-7169 in Ubuntu (and maybe for other nx varieties as well).
Update:
- Easiest test through https://github.com/hannob/bashcheck:
curl https://raw.githubusercontent.com/hannob/bashcheck/master/bashcheck > bashcheck.sh
less bashcheck.sh # check if there is nothing fishy
chmod +x bashcheck.sh && ./bashcheck.sh
rm bashcheck.sh - On a Mac: OS X – How do I recompile Bash to avoid Shellshock the remote exploit CVE-2014-6271 and CVE-2014-7169? – Ask Different.
- Shellshock BASH Vulnerability Tester.
- Security Experts Expect ‘Shellshock’ Software Bug in Bash to Be Significant – NYTimes.com.
- Lots of exploit examples: What is a specific example of how the shellshock bash bug could be exploited? – Information Security Stack Exchange.
- Bash Code Injection Vulnerability CVE-2014-6271 – Red Hat Customer Portal.
- Bash Code Injection Vulnerability via Specially Crafted Environment Variables CVE-2014-6271, CVE-2014-7169 – Red Hat Customer Portal.
Quote from the article:
Posted in *nix, *nix-tools, bash, Development, Power User, Scripting, Software Development | Leave a Comment »
A few must watch videos on test driven development and unit testing
Posted by jpluimers on 2014/09/25
If you are going to do test driven development and unit testing, you should watch these videos and slide decks, most of them by Miško Hevery:
- Not a video, but a good starter: Guide: Writing Testable Code (or read the PDF version).
- 0:32:07 ▶ “The Clean Code Talks — Unit Testing” – YouTube.
- slides: Clean Code Talks – Unit Testing (Q&A: be careful that Monkey Patching does clean up after itself and not infect the global state).
doc: https://docs.google.com/presentation/d/1kwOVQakhNo_lRTbuSDyCut3-ob1RIJVhTjuPQda04q0/embed
- slides: Clean Code Talks – Unit Testing (Q&A: be careful that Monkey Patching does clean up after itself and not infect the global state).
- 0:37:56 ▶ The Clean Code Talks – Don’t Look For Things! – YouTube. Read the rest of this entry »
Posted in .NET, Agile, C#, Delphi, Development, Java, Java Platform, JavaScript/ECMAScript, Pascal, Scripting, Software Development, Unit Testing, VB.NET | 2 Comments »





