Visit site Yanniel's notes

August 2011

0
votes
Vote UpVote

Anonymous Methods in Delphi

Yanniel's notes – Under the scope of Delphi, an anonymous method is either a procedure or function that’s unattached to an identifier. In other words, anonymous methods don’t have names, which is why they are called “anonymous”.Basically, you can assign a block of code (in the form of a procedure or function) ...
Details Favorite? Off-Topic? Yanniel @ 2011-08-19 14:38
0
votes
Vote UpVote

My contributions to the Delphi community at RosettaCode

Yanniel's notes – RosettaCode is a wiki site that gathers a collection of programming tasks being resolved in as many programming languages as possible.You can post solutions to a particular task using a particular language (Delphi, Java, C++, C#, Ruby, the list goes and goes).  All solutions to the same task ...
Details Favorite? Off-Topic? Yanniel @ 2011-08-15 23:39
0
votes
Vote UpVote

Hide the utter "Create" constructor of TObject in Delphi

Yanniel's notes – In Delphi, constructors can be inherited; this doesn’t happen in Java, C# and C++ for example. Furthermore, constructors in Delphi can have multiple and different names; usually they are called Create, but this is just a convention, since you can define a constructor with whatever name you choose.In ...
Details Favorite? Off-Topic? Yanniel @ 2011-08-15 22:45
0
votes
Vote UpVote

Implementing the Singleton Design Pattern in Delphi without Global Variables

Yanniel's notes – The purpose of this post is NOT to cover the insights and applicability of the Singleton pattern, instead  I just pretend to give you a Delphi code snipped that implements it. This implementation is focused in avoiding variables that are global to the unit (or Unit Global Variables).Fist of ...
Details Favorite? Off-Topic? Yanniel @ 2011-08-15 14:54

July 2011

0
votes
Vote UpVote

Using Macros in Delphi

Yanniel's notes – Computer programmers often need to transform a piece of code in a repetitive way. For example, consider transforming the following fields declaration into a fields initialization [1], as shown below: You can do that by hand of course, but you can also use macros to streamline your work, specially if ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 12:03
0
votes
Vote UpVote

Null character in Delphi (Caret notation: ^@)

Yanniel's notes – I was assigned with a new programming task and I found the following constant declaration in the base code (Delphi 2007):const  s1 : PChar = ^@;I was not sure about the meaning of such statement: the first ideas in my mind pointed me to think about some kind of pointer related syntax. I was ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 12:02
0
votes
Vote UpVote

Delphi Developers in Toronto

Yanniel's notes – There are very little opportunities for Delphi developers in Toronto (Canada). The job market for software developers in this area is monopolized by .NET (C#, VB) and Java technologies in at least an 80 percent. C, C++, PHP, Ruby and even Objective C are more popular than Delphi these days.I love ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 12:01
0
votes
Vote UpVote

String compression/decompression routines using Delphi

Yanniel's notes – I wrote the following two functions (in bold) with the purpose of compressing/decompressing string values within a Delphi application: .........................implementationuses  ZLib;function ZCompressString(aText: string; aCompressionLevel: TZCompressionLevel): string;var  ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 12:00
0
votes
Vote UpVote

Fetching a web page with Delphi

Yanniel's notes – This function fetches the HTML content of a given web page. It takes the page's URL as parameter and returns the corresponding HTML text. The name CURL comes from the PHP Client URL Library that can be used (among other things) for the same purpose..................implementationuses  ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 12:00
0
votes
Vote UpVote

Calculating the factorial of a number in Delphi: Recursive and iterative methods

Yanniel's notes – The factorial function can be defined in both recursive and iterative ways. Take a look at the following definitions borrowed from Wikipedia.Recursive definition: Iterative definition:For both the above definitions we have that: The purpose here is not the mathematical stuff, but two provide the ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 11:59
0
votes
Vote UpVote

New certifications available for Delphi Developers

Yanniel's notes – Last June 12th, 2011, I received an Embarcadero Community Newsletter pointing out that “certification exams are now available for Delphi developers.  Embarcadero's Delphi Certification Program offers two levels: Delphi Certified Developer and Delphi Certified Master Developer. “I just passed ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 11:59
0
votes
Vote UpVote

Template Method Design Pattern in Delphi. A working example

Yanniel's notes – The Template Method Pattern is very easy to understand and implement. Here’s the definition borrowed from Design Patterns: Elements of Reusable Object-Oriented Software book:“Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 11:58
0
votes
Vote UpVote

Parameterized Factory Method in Delphi

Yanniel's notes – Factory Method is a creational design pattern, whose intent (according to Design Patterns: Elements of Reusable Object-Oriented Software book) is to:“Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to ...
Details Favorite? Off-Topic? Yanniel @ 2011-07-20 11:57
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Delphi Tage Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)