Click here to Skip to main content
12,701,051 members (27,359 online)

Pablo Aliskevicius - Professional Profile





Summary

Google+ LinkedIn      Blog RSS
15,329
Author
4,832
Authority
1,074
Debator
62
Editor
37
Enquirer
757
Organiser
2,393
Participant
Pablo writes code for a living, in C++, C#, and SQL.

To make all that work easier, he uses some C++ libraries: STL, ATL & WTL (to write Windows applications), and code generation.

Pablo was born in 1963, got married in 1998, and is the proud father of two wonderful girls.

Favorite quotes:
"Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, "The Devil's Dictionary", published in several newspapers between 1881 and 1906).
"You are to act in the light of experience as guided by intelligence" (Rex Stout, "In the Best Families", 1950).
  • 18 Oct 2013: Best C++ article of September 2013

Reputation

For more information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege, and the given member types also gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilverAdmin
Bypass spam checks when posting contentsilversilversilversilversilversilversilverSitebuilder, Subeditor, Mentor, Protector, Editor, Staff, Admin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your biographybronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an ArticlesilversilversilversilverSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending QuestionProtector, Admin
Approve/Disapprove a pending AnswerProtector, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Approve/Disapprove a pending Forum MessageProtector, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

Actions with a green tick can be performed by this member.


 
GeneralOn global pointers. Pin
Pablo Aliskevicius4-Apr-12 20:42
memberPablo Aliskevicius4-Apr-12 20:42 
GeneralThe programmer as an artist Pin
Pablo Aliskevicius13-Sep-11 0:09
memberPablo Aliskevicius13-Sep-11 0:09 
GeneralRe: The programmer as an artist Pin
Aniruddha Loya14-Nov-11 22:29
memberAniruddha Loya14-Nov-11 22:29 
GeneralThere is no such thing as quick and dirty. Pin
Pablo Aliskevicius30-Mar-09 22:30
memberPablo Aliskevicius30-Mar-09 22:30 
GeneralRe: There is no such thing as quick and dirty. Pin
ThatsAlok </18-Jul-11 23:57
member ThatsAlok 18-Jul-11 23:57 
GeneralRe: There is no such thing as quick and dirty. Pin
Pablo Aliskevicius19-Jul-11 3:39
memberPablo Aliskevicius19-Jul-11 3:39 
GeneralRe: There is no such thing as quick and dirty. Pin
ThatsAlok </20-Jul-11 2:07
member ThatsAlok 20-Jul-11 2:07 
GeneralShame on me: a race condition.... Pin
Pablo Aliskevicius28-May-08 9:39
memberPablo Aliskevicius28-May-08 9:39 
GeneralWhen multithreading is not an option... Pin
Pablo Aliskevicius19-Mar-07 11:18
memberPablo Aliskevicius19-Mar-07 11:18 


The word 'legacy' means different things to different people. To me, it brings associations of hounted manors...


A few weeks ago, I found myself writing a program (Windows service, listens for events and passes them on) which had to use a legacy DLL while providing decent performance.
The first thing that came to mind was multithreading. It didn't last.

That DLL does not support multithreading: it has lots of global variables, which, if you're old enough, you may remember were deemed 'efficient' by C programmers, since they don't take stack space; in the days of DOS, with 32Kb stack, that was meaningful.
Refactoring the DLL was not an option: lots of work and lots of testing, with the prospect of breaking something, and under an extremely tight budget; and someone else is in charge of maintenance of that DLL.


Then I remembered having seen somewhere threads referred to as 'lightweight processes' (in a book about Windows 95 programming), so I figured, can processes do the task?


Fortunately, the DLL exposes only one function, which performs a rather lengthy batch operation.

The solution was like this:

I wrote an EXE which takes parameters somehow (it reads them from a SQL stored procedure, but the command line or a text file could have been used as well), and passes them to the DLL.
The service manages a process pool, whose maximum size depends on the number of CPUS in the machine.
When an event is detected, it's added to the SQL table which the aforementioned procedure reads from; one of the server processes is selected from the pool; if it's necessary, CreateProcess() is called on the executable (unless it's already running).

It might seem a bit crude, but it gives above-decent performance, the service itself keeps a tiny footprint (it has no code that really 'does' stuff), and any crashes in the legacy DLL (it didn't happen yet, but it might) don't crash the service.

Also, debugging a 'regular process' (single threaded) is easier than debugging a multi-threaded service.


The moral? Sometimes heavyweight is the right weight. As much as I like threads, there are other tools available, and they should not be forgotten.


Pablo_A

GeneralMore on thread procedures... Pin
Pablo Aliskevicius13-Oct-06 4:36
memberPablo Aliskevicius13-Oct-06 4:36 
General::PostThreadMessage. Pin
Pablo Aliskevicius11-Oct-06 9:05
memberPablo Aliskevicius11-Oct-06 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 23 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid