Click here to Skip to main content
15,885,244 members

Pablo Aliskevicius - Professional Profile



Summary

LinkedIn      Blog RSS
17,120
Author
4,922
Authority
1,072
Debator
62
Editor
37
Enquirer
762
Organiser
2,440
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).

Reputation

Weekly Data. Recent events may not appear immediately. For 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. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

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


 
GeneralOn global pointers. Pin
Pablo Aliskevicius4-Apr-12 19:42
Pablo Aliskevicius4-Apr-12 19:42 
GeneralThe programmer as an artist Pin
Pablo Aliskevicius12-Sep-11 23:09
Pablo Aliskevicius12-Sep-11 23:09 
GeneralRe: The programmer as an artist Pin
Aniruddha Loya14-Nov-11 21:29
Aniruddha Loya14-Nov-11 21:29 
GeneralThere is no such thing as quick and dirty. Pin
Pablo Aliskevicius30-Mar-09 21:30
Pablo Aliskevicius30-Mar-09 21:30 
GeneralRe: There is no such thing as quick and dirty. Pin
ThatsAlok18-Jul-11 22:57
ThatsAlok18-Jul-11 22:57 
GeneralRe: There is no such thing as quick and dirty. Pin
Pablo Aliskevicius19-Jul-11 2:39
Pablo Aliskevicius19-Jul-11 2:39 
GeneralRe: There is no such thing as quick and dirty. Pin
ThatsAlok20-Jul-11 1:07
ThatsAlok20-Jul-11 1:07 
GeneralShame on me: a race condition.... Pin
Pablo Aliskevicius28-May-08 8:39
Pablo Aliskevicius28-May-08 8:39 
GeneralWhen multithreading is not an option... Pin
Pablo Aliskevicius19-Mar-07 10:18
Pablo Aliskevicius19-Mar-07 10: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 3:36
Pablo Aliskevicius13-Oct-06 3:36 
General::PostThreadMessage. PinPopular
Pablo Aliskevicius11-Oct-06 8:05
Pablo Aliskevicius11-Oct-06 8: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.