Search This Blog

Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Wednesday, July 12, 2023

The fastest compiler of any programming language ever!


It should be Turbo Pascal, isn't it? ðŸ¤”

The fastest compiler of any programming language ever is a matter of debate, but some of the contenders include:

  • Turbo Pascal. This compiler was released in 1983 and was known for its speed. It could compile a Pascal program in a fraction of a second, which was very impressive at the time.
  • WATFOR, WATFIV, and WATBOL. These compilers were developed in the 1960s and 1970s for educational purposes. They were designed to be very fast, so that students could get their programs compiled and running quickly.
  • Jon Blow's Jai. This language is still under development, but it has the potential to be one of the fastest compilers ever. Jai is designed to be very efficient and to produce high-performance code.
It is difficult to say definitively which compiler is the fastest, as different compilers may be faster for different types of programs. However, the compilers listed above are all known for their speed and are considered to be among the fastest compilers ever created.

In addition to these compilers, there are a number of other factors that can affect the speed of compilation, such as the complexity of the program, the compiler's optimization settings, and the hardware platform on which the compiler is running. As a result, it is difficult to compare the speeds of compilers directly.

However, the compilers listed above are all known for their speed and are considered to be among the fastest compilers ever created. If you are looking for a compiler that can compile your programs quickly, then any of these compilers would be a good choice.


What about the modern Pascal (Delphi) compiler?

Delphi is one of the fastest compilers of all time. this means that Delphi can compile code faster than a lot of other compilers. this is due to the fact that Delphi uses a technology called "incremental compilation." Incremental compilation means that Delphi only compiles the parts of the code that have been changed since the last compilation. This saves a lot of time when compiling large projects. Delphi also has an optimizer that can perform various optimizations to the code. This results in faster running code.

Delphi also has a feature called "link time optimization." Link time optimization means that Delphi can optimize the code even more by analyzing the whole project at once. This is different from other compilers that optimize each unit separately. The result is even faster and more efficient code.

Moreover, Delphi has a great community that constantly provides support, tools, and libraries. There are many different libraries available for Delphi that can be used to speed up development and improve the performance of code. 
Furthermore, Delphi provides an Integrated Development Environment (IDE) that is specifically designed for it. 
This IDE makes it easy to use the various features of Delphi, such as debugging, refactoring, and profiling.

Another advantage of using Delphi is that it supports multiple platforms, including Windows, macOS, iOS, and Android. This means that developers can create applications for various platforms using the same codebase with Delphi.

P.S : In summary, Delphi is the fastest compiler of any programming language that I've tried until now, 
I tried C, Java, and C# during my career time and recently Dart!
Due to its incremental compilation feature, optimizer, and link time optimization. Additionally, the wide range of support provided by the community and the multi-platform capabilities make it a great choice for developers looking to create efficient and effective applications.

Thursday, July 6, 2023

Why hirinng managerrs love this 6-lettr word?!!!

 

Notice something weird about the subject line?


Of course, you did.

There are typos in it.

And typos catch your attention.

Now, for the subject line of an email or a blog post, this works fine, because it got you to open it.

But tiny mistakes in your resume? They do the exact opposite.

Here's why:

On average, 118 people apply to each job, which means that even if a lot of resumes don’t make it past the ATS (Applicant Tracking System), recruiters have a huge “virtual stack” of resumes to go through.

So what is the stage 1 of the hiring process?

Cut down the field!

Meaning, when a recruiter clicks on your resume, they’re looking for literally ANY excuse to use their favorite 6-letter word - DELETE - and move on to the next one.

Small typo?

Delete.

Wrote ‘managing’ when it should’ve been ‘managed’?

Delete.

Are dates not properly formatted?

Delete.

29 candidates with less than a 50% match in the ATS for the job description keywords?

Select All, DELETE.

It’s like choosing a movie on Netflix.

With so many options, the tiniest thing you don’t like makes you skip to the next one.

And even once the field’s been whittled down, remember: hiring is risky business. With the average cost per hire around $4,700, thousands of $$$ hang in the balance.

Do you really think an employer’s going to take a chance on someone who - in their eyes - didn’t take the time to properly edit their resume?

Nope.

That’s why if you’re going to run the gauntlet of job-hunting…

Don’t shoot yourself in the foot by letting the small mistakes get overlooked on your resume.

Before you send it out, I'd recommend you put yourself in the shoes of a hiring manager and go through it with a fine-toothed comb. 

Do not give employers an excuse to press ‘Delete’.

How to fix it?

If you want to find and fix issues in your resume try to learn about it online or use resume optimization websites like Resume Worded or Kickresume or any other website like that.

ADA and it's grandfather Pascal!

Flashback

Pascal is a procedural programming language that was developed by Niklaus Wirth in the late 1960s and early 1970s. The language was named after French mathematician and philosopher, Blaise Pascal. Initially designed as a language for teaching programming, Pascal quickly gained popularity among programmers due to its simplicity and readability.

The early versions of Pascal were implemented on mainframe computers, but later it was also available for microcomputers. The language was widely used in academic settings and was popular among hobbyists who had access to personal computers. In the 1980s, a version of Pascal called Turbo Pascal was released by Borland International, which became very popular due to its fast compiling times and compatibility with IBM PC-compatible computers.

In the early 1990s, Borland released Delphi, an object-oriented version of Pascal that included a visual development environment and a powerful class library. Delphi was designed to be an easy-to-use, rapid application development tool for Windows, and it quickly gained a large following among Windows developers. Its popularity eventually led to the creation of the open-source Lazarus project, which aims to recreate the Delphi IDE and class library using free and open-source software.

The philosophy behind the creation of the Ada programming language was quite different from that of Pascal. Ada was specifically designed for large-scale, safety-critical systems, such as those used in the military and aerospace industries. The language was created by a team of experts from government, industry, and academia, who collaborated to create a language that would be safe, reliable, and scalable.

One of the key design principles of Ada was its support for modularity and abstraction. The language includes features such as packages, generics, and tasking, which allow code to be organized into reusable units and executed concurrently. This makes it well-suited for complex systems that require high levels of reliability and maintainability.

While there are some similarities between Delphi and Ada, such as their support for object-oriented programming and their use of Pascal-like syntax, the two languages have different goals and design principles. Delphi is focused on rapid application development for Windows, while Ada is focused on safety-critical systems. However, both languages demonstrate the versatility of the Pascal language family and its ability to adapt to a variety of different programming paradigms and application domains, 

Which one is influenced by the other?

Ada was influenced by Pascal.

Ok, it's Enough! Show me the code!

let's compare the syntax of ADA and Delphi with some sample code!


// Sample Pseudocode
if (x > y) then
    z := x + y;
else
    z := x - y;
endif;

In ADA, the equivalent code would look like this:

-- ADA Code
if x > y then
    z := x + y;
else
    z := x - y;
end if;

In Delphi, the equivalent code would look like this:


// Delphi Code
if x > y then
    z := x + y
else
    z := x - y;
As you can see, there are some syntactical differences between the three languages:
In ADA, statements are terminated with semicolons (;),
while in Delphi they are terminated with optional semicolons.
ADA uses the end if keyword to terminate conditional statements,
while Delphi uses the end keyword.
In Delphi, the then keyword is followed by a new line instead of a space.

Overall, ADA and Delphi have similar syntax structures for
their control flow statements, but there are some minor differences
in how they handle keywords and semicolons.

Here are some more complex examples of code in both ADA and Delphi along with
an explanation of the differences in their syntax:

Example 1: Looping through an array


// Sample Pseudocode
for i = 0 to len(array)-1 do
    print(array[i])
end for 

In ADA, the equivalent code would look like this:


-- ADA Code
for i in 0..array'Length-1 loop
    Put_Line(Integer'Image(array(i)));
end loop;

In Delphi, the equivalent code would look like this:


// Delphi Code
for i := 0 to Length(array)-1 do
    WriteLn(array[i]);
As you can see, there are several differences between the two languages
in this example:In ADA, the for loop uses the in keyword to define
the range of the loop. ADA uses the Put_Line procedure to print output to the console,
while Delphi uses the WriteLn function. In ADA, the array'Length syntax is used to get the length of the array,
while in Delphi, the Length function is used.

Example 2: Creating a function with parameters

Here's some pseudocode to create a function that takes in two integers
and returns their sum:

// Sample Pseudocode
function addNumbers(num1, num2) {
    return num1 + num2;
}

In ADA, the equivalent code would look like this:

-- ADA Code
function Add_Numbers (Num1 : Integer; Num2 : Integer) return Integer is
begin
    return Num1 + Num2;
end Add_Numbers;
In Delphi, the equivalent code would look like this:

// Delphi Code
function Add_Numbers(num1, num2: Integer): Integer;
begin
    Result := num1 + num2;
end;
In this example, there are a few differences between the ADA and Delphi syntax:
In ADA, the function is defined using the function keyword and the return type is
specified after the parameter list. In Delphi, the return type is specified before
the function name. In ADA, the return keyword is used to return a value from a function,
while in Delphi, the Result variable is used.
Both languages use semicolons to terminate statements, but in ADA they are required. Overall, both ADA and Delphi have similar syntax structures for creating functions
with parameters, but they have some minor differences in how they handle keywords,
semicolons, and return values.

Example 3: tasking in ADA and modern Delphi.

In ADA, tasking is an essential feature for concurrent programming.
Here's an example that demonstrates the use of tasks in ADA:

-- ADA Code
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Task_Example is
   task type Worker_Task is
      entry Set_Value (New_Value : Integer);
      entry Get_Value (Result : out Integer);
   end Worker_Task;

   task body Worker_Task is
      My_Value : Integer := 0;
   begin
      loop
         select
            when Set_Value'Event =>
               accept Set_Value (New_Value : Integer) do
                  My_Value := New_Value;
               end Set_Value;
               
            when Get_Value'Event =>
               accept Get_Value (Result : out Integer) do
                  Result := My_Value;
               end Get_Value;
         end select;
      end loop;
   end Worker_Task;

   W1 : Worker_Task;
   W2 : Worker_Task;
begin
   W1.Set_Value(10);
   W2.Set_Value(20);
   
   Put("W1's value is: ");
   W1.Get_Value(Result => Integer'Image(Result));
   Put_Line(Result);
   
   Put("W2's value is: ");
   W2.Get_Value(Result => Integer'Image(Result));
   Put_Line(Result);
end Task_Example;
In this example, we define a task type called Worker_Task that has two entries:
Set_Value and Get_Value.
The Set_Value procedure sets the value of a private integer variable called
My_Value, while the Get_Value procedure returns the current value of My_Value.
The task then enters a loop where it accepts incoming requests to either
set or get the value of My_Value. Two instances of the Worker_Task task type are then created (W1 and W2),
and their Set_Value entries are called to set their respective values.
Finally, the Get_Value entries are called for both tasks to retrieve
their current values.
In modern Delphi (version XE7 and later), tasking is implemented using the
TTask class.

Here's an example of how tasks can be used in Delphi:

program Task_Example;
// Delphi Code
{$APPTYPE CONSOLE}

uses
  System.Threading,
  System.SysUtils;

procedure Worker_Task(Value: Integer; var ResultVar: Integer);
begin
  // Perform some work here...
  
  ResultVar := Value * 2;
end;

var
  T1, T2: ITask;
  Result1, Result2: Integer;
begin
  T1 := TTask.Create(
    procedure
    begin
      Worker_Task(10, Result1);
    end
  );
  
  T2 := TTask.Create(
    procedure
    begin
      Worker_Task(20, Result2);
    end
  );
  
  T1.Start;
  T2.Start;
  
  T1.Wait;
  T2.Wait;
  
  Writeln('Result1 = ', Result1);
  Writeln('Result2 = ', Result2);
  
  Readln;
end.
In this example, we define a procedure called Worker_Task that performs some work
and sets the value of a passed-in variable called ResultVar.
Two instances of the ITask interface are then created (T1 and T2) using the TTask.
Create a constructor and pass in anonymous procedures that call Worker_Task
with different values. The tasks are started using the Start method and then waited for using the
Wait method.
Finally, the results of both tasks are printed to the console.

Is it worth learning and investing in ADA programming language in 2023?

(Answered by ChatGPT)
Is there any job for that out there?

In 2023, Ada programming language is still widely used in industries
such as defense, aerospace, transportation, and healthcare, where safety
and reliability are critical concerns.
Therefore, learning and investing in the Ada programming language can be valuable
if you are interested in pursuing a career in these industries. There are several job opportunities available for Ada programmers,
particularly in the defense and aerospace sectors.
Job titles may include software engineer, systems engineer,
embedded software developer, and safety-critical software developer.
However, it's worth noting that while Ada remains relevant in certain industries,
its popularity has waned in recent years with the rise of newer languages
like Rust, Swift, and Kotlin. Therefore, before investing your time and effort
in learning Ada, it's worth considering the demand for Ada programmers in your
target industry and assessing whether learning other languages might offer
better job prospects.

Is it worth learning Delphi programming language in 2023?

(Answered by ChatGPT)
Is there any job for that out there?

Delphi is a programming language that has been around for many years
and has been widely used in various industries, especially for developing
desktop applications.
However, its popularity has decreased over time, and it's not as widely used
today as it once was.
That being said, there are still some job opportunities available for Delphi 
developers, particularly in industries where legacy systems are still 
running on Delphi codebases. 
For instance, some companies might need to maintain an existing application
 or upgrade it, which requires knowledge of the Delphi language. 
Additionally, some government agencies and defense contractors still use Delphi
for developing certain applications.
So, while Delphi may not be as popular as other languages like Java, Python,
or JavaScript, there are still opportunities for Delphi developers.
However, if you're new to programming and looking to learn a new language,
you might want to consider learning one of the more in-demand languages
to increase your job prospects.