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
  1. Home
  2. The Lounge
  3. Getting the algorithm right

Getting the algorithm right

Scheduled Pinned Locked Moved The Lounge
helpcomalgorithmstutorialquestion
24 Posts 13 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T trønderen

    Spurred by this week's survey (Do you get up in the middle of the night to code because you can't sleep?[^]): How much of your work hours and/or mental energy goes to find an "algorithmic solution" to your problem? I have been coding for a few decades, but my experience is that at least 90% of my time and energy goes to collecting background information, putting pieces together (rather mechanically), typing the code, writing tests, managing the build scripts, reading compiler listings and logs, writing documentation, presenting stuff to coworkers, ... I cannot recite all sorts of algorithms by heart, so sometimes I dig up a text (or open-source code) describing how to solve the problem. Very rarely am I stuck with a problem where I cannot quite easily either devise a method (usually composed from a set of partial solutions), or where I can find a workable solution in literature or on internet. Those 'eureka moments' are for the most part limited to when I understand the logic in a textbook presentation of an algorithm. I can't imagine not falling asleep because I am unable to devise a new, great, hitherto unknown algorithm. Of course: If you are an advanced research scientist in a field such as eg. numerical methods, then you job is to develop new algorithms for the algorithm's sake. Few of us are. Maybe I am different. Do you really spend any significant fraction of your working hours or mental capacity on developing new methods/algorithms?

    S Offline
    S Offline
    stheller2
    wrote on last edited by
    #21

    At present, most of my mental capacity is spent on refining and adding to the implementation of my novel native-variable-length hash table, part of which is covered by U.S. Patent No.: 11,254,590. But I spent many restless nights trying to devise the basic algorithm that allows the storage of multiple record types directly in a hash table; after all, that has been considered impossible since the invention of the hash table in the 1950's!

    1 Reply Last reply
    0
    • B BernardIE5317

      Isn't every routine/function/method/class/program an "algorithm" of sorts? As for my own time much of it is spent watching the twirly blue circle in Visual Studio and occasionally the white screen of death. Then there are the many many many 15m builds and the occasional language error leaving me scratching my head and attempting to discern the cryptic not very informative compiler error message. - Cheerio "I once put instant coffee into the microwave and went back in time." - Steven Wright "Shut up and calculate" - apparently N. David Mermin possibly Richard Feynman My sympathies to the SPAM moderator “I want to sing, I want to cry, I want to laugh. Everything together. And jump and dance. The day has arrived — yippee!” - Desmond Tutu “When the green flag drops the bullshit stops!” "It is cheaper to save the world than it is to ruin it." "I must have had lessons" - Reverend Jim Ignatowski / Christopher Lloyd

      S Offline
      S Offline
      stheller2
      wrote on last edited by
      #22

      How big is your cade base? I have a fairly big code base (50k lines maybe) and it takes about 15s, not 15m to compile on my 32-hyperthread CPU.

      B 1 Reply Last reply
      0
      • S stheller2

        How big is your cade base? I have a fairly big code base (50k lines maybe) and it takes about 15s, not 15m to compile on my 32-hyperthread CPU.

        B Offline
        B Offline
        BernardIE5317
        wrote on last edited by
        #23

        Approximately 15K lines mostly templates plus 1.5K lines test code. When this project is done pretty soon now I intend to return to a project finished some years ago 50K lines in C and convert to C++ w/ modern UI/GUI and many improvements. No way I will tolerate the build times for that size. I will have to get a proper development machine. My current horse and buggy is https://www.hp.com/us-en/shop/pdp/hp-slimline-desktop-290-a0035z[^]

        S 1 Reply Last reply
        0
        • B BernardIE5317

          Approximately 15K lines mostly templates plus 1.5K lines test code. When this project is done pretty soon now I intend to return to a project finished some years ago 50K lines in C and convert to C++ w/ modern UI/GUI and many improvements. No way I will tolerate the build times for that size. I will have to get a proper development machine. My current horse and buggy is https://www.hp.com/us-en/shop/pdp/hp-slimline-desktop-290-a0035z[^]

          S Offline
          S Offline
          stheller2
          wrote on last edited by
          #24

          Yes, I would say you need a new development machine!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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