Jump to content

Search the Community

Showing results for tags 'coding-general'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. In my last job and for a number of private projects I needed to port huge amounts of code between languages. I'm specifically talking about ports on one and the same platform. Here are some tips I consider useful (from experience) in no particular order: a) Pre-porting Obviously, create a safe (sandbox) copy of whatever you are about to port. Separate it completely from anything important, even if this means setting up another production environment. b ) While porting Never try to fix something on the flyIf you need to substitute some paradigm (e.g. nested structures) not available in the target language, write a substitute and test it before starting to translateBack up target code on almost every new LOC, use git and write an auto-commit script when in doubtGo on a module by module basis, never translate whole code pages the same timeNever change any variable / constant etc. names on the flyIf time and budget allows, always write test wrappers for longer modules to verify every code path in source and target code (unless dependent on user input, of course)Always assume the code you are porting was written by a person desperately trying to confuse you, even if it was you who wrote it!Some languages have a (or multiple) different array base(s)Don't trust automated translation (I know C#<->VB.NET is tempting) tools, never attempt to create any automated translation toolsRecreate not only code, but also file-structure, even if this is bad practice in the target languageKeep the case-sensitivity of the target and source language in mindDon't delete anything on the way, just comment outYou don't want to care about any best practices or conventions, you care about a 1:1 copy; everything else is post-portingc) Post-porting Create a whole backup of the new code and put it somewhere safe. Then, and only then, start working with a fresh copy of the new code. After all the projects I've been through, I can only say the above also applies when the source (no pun intended) code is only 200 LOC long. If the source language is complex enough, you'd be surprised how bad one can f*ck things up. If you have any additional tips or stories regarding ports, leave them here.
×
×
  • Create New...