Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sx2008

@sx2008
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ?
    S sx2008

    ReTuRn("December"); // this is a function call
    return("December"); // this is a return statement

    Don't make a return statement look like a function call.

    Quote:

    You can write a C program on one line by removing those unnecessary end of line characters but that is not a good idea either.

    Yes, but it makes the code less readable. Changing return("December"); to return "December"; improves the readability. You may argue it doesn't make a difference, but it does. Your Brain needs a little more power to decode the text on the screen. (Even the C-compiler needs some microseconds more) It's a good exercise for a developer to go down the rabbit hole...

    return ((((0)))); // valid code, but stupid
    return ((0)); // still stupid
    return 0; // that's the way to go

    The Lounge question c++ devops

  • ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ?
    S sx2008

    Early c-compilers could only return values but not expressions. (this was a design flaw of the compiler/c language)

    {
    int x;
    x = 42;
    return x; // ok
    return x + 1; // does not compile because x + 1 is an expression
    return(x + 1); // ok, the expression is evaluated by the compiler

    This is why you see the return statement so often together with parentheses even when they aren't required anymore. You should NOT write these unnesseccary parentheses anymore! The return statement is not a function call; just omit the parentheses.

    The Lounge question c++ devops

  • cross compiling a huge codebase from Power++ to c#
    S sx2008

    Hi, my team members are trying to cross compile a huge codebase (4100 forms, 9300 files) from Power++ (an old C/C++ IDE made by Whatcom/Sybase ano 1999) to C#. This codebase is very old and has a lot of issues with quality (copy and paste everywhere, spaghetti code, code smells, ...). Everything started with a tool that converts Power++ forms to WinForms. (that worked surprisingly well) But now they want to convert the whole C++ codebase to C# (there is still some manual work needed to make the C# code compile). They think if everything is translated to C# their productivity will rise and they have a lot of time to improve the code. What do you think about this method ? Is it a good idea to build a 'new' software completely on legacy code ?

    Design and Architecture csharp c++ visual-studio winforms collaboration

  • Is there malware that even a reformat of the hard drive can't remove?
    S sx2008

    Yes. :( The firmware of hard drives can be updated and infected by a persistent virus. The same applies to USB thumb drives. Of cause there is very deep knowledge required to accomplish this. [Destroying your hard drive is the only way to stop the super-advanced Equation malware | PCWorld](https://www.pcworld.com/article/2884952/equation-cyberspies-use-unrivaled-nsastyle-techniques-to-hit-iran-russia.html) If the firmware of your ethernet network adapter or WLAN adapter gets infected your machine is lost. An attacker can send you secrect data packets over the network and gain direct access to your RAM. Your machine could also disconnected temporary or permanently from the internet ('internet kill switch').

    The Lounge com security performance question

  • If it fails, try again
    S sx2008

    Don't forget to put in an

    Thread.Sleep(500)

    to give the database connection a chance to recover from the failure state. ;P

    The Weird and The Wonderful database

  • Microsoft, Javascript and not cutting corners
    S sx2008

    There is a standard date/time format when interchanging information between different applications: [ISO 8601](https://en.wikipedia.org/wiki/ISO\_8601)

    string data = "2017-04-14T01:27:00+02";
    DateTime dt = DateTime.Parse(data);

    The Weird and The Wonderful csharp javascript sysadmin testing beta-testing

  • integration hell
    S sx2008

    cp-andy wrote:

    But our team has now increased and quite often two developers end up over writing each others code.

    I seems that you have a problem with the partioning of your codebase. Try to identify the hot spots and refacture it (smaller classes, more source files, apply well known design patterns)! Watchout for source code files with many bugfixes and files with too many lines of code. Changing your version control system doesn't help if 2 or more developers make large changes on the same files. Git (or any other version control system with 3-way-merge) can only merge small changes automatically.

    The Lounge collaboration sysadmin question workspace

  • Time logging... why?
    S sx2008

    Time tracking without tools is a real bummer. I really hate it because i want to create software without distractions. We're using Deskzilla for tracking the time we spend on diffent tasks. This allows me to track my time with a single mouse click: screenshot Deskzilla It's possible to change the recorded timespans later (sometimes i forget to switch the tracker). With a one-click-tool like this it's ok for me to log my time, but by hand is a no-go for me.

    The Lounge collaboration help php design business

  • REFRESHING DBGRID IN D7
    S sx2008

    You should use only one connection. If you set a connection string on a ADOQuery or ADOCommand then the VCL will generate a new hidden connection in the background for the component. Each connection has it's own cache inside of the driver (jet engine) for the access database. If you modify the database through one connection the other connection will not see this change immediatly. It needs about 6 to 10s to write the changes to the *.mdb file. After that the other connection has the opportunity to read the changes. ==> allways use only one connection (TADOConnection)

    Delphi database question help announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups