Author Topic: Is this ugly coding?  (Read 5565 times)

qWord

  • Member
  • *****
  • Posts: 1473
  • The base type of a type is the type itself
    • SmplMath macros
Re: Is this ugly coding?
« Reply #15 on: November 07, 2014, 10:22:49 PM »
My question remains. Is this ugly coding?
It is (bad style) programming.
MREAL macros - when you need floating point arithmetic while assembling!

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Is this ugly coding?
« Reply #16 on: November 08, 2014, 06:10:29 AM »
It is (bad style) programming.

that's a bit exaggerated. But it's bad style. That's right.

Gunther
Get your facts first, and then you can distort them.

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: Is this ugly coding?
« Reply #17 on: November 08, 2014, 07:02:26 AM »
MINOR28,
...At least you're not getting death threats,...
That's when you can be certain that your code is ugly,...
Zen

Magnum

  • Member
  • *****
  • Posts: 2304
Re: Is this ugly coding?
« Reply #18 on: November 08, 2014, 01:47:32 PM »
It is an existing dll function that I use in some of my programs. Now I update this function and I need an additional parameter without having to modify the applications that already use it.

What does your solar calculations do ?

Solar calculations is a stand alone application to calculate solar data
on choosen places and choosen times.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

minor28

  • Member
  • **
  • Posts: 115
Re: Is this ugly coding?
« Reply #19 on: November 08, 2014, 07:49:20 PM »
Solar calculations. Click on a place on the google maps and the latitude, longitude, time zone, daylight saving time, time, solar elevation and solar azimuth can be read on that place. I have an updated version not published yet.

Ugly was perhaps not the right word to use. I suppose it would have been "bad style". I had a feeling that it was not a common way to code, hence my question. I will take qWord's suggestion and write a new function.

Thank you

Vortex

  • Member
  • *****
  • Posts: 1996
Re: Is this ugly coding?
« Reply #20 on: November 08, 2014, 08:09:17 PM »
Hi minor28,

No worries and no ugliness. With some modifications, your code will be fine. You mentioned about Solar calculations. Keep up the good work.