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. Worst Coding

Worst Coding

Scheduled Pinned Locked Moved The Lounge
4 Posts 4 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.
  • D Offline
    D Offline
    Dave B
    wrote on last edited by
    #1

    May I be so bold to suggest a new competition, sorry no prizes here, just satisfaction that you are a good programmer. How about a worst code comp. Heres my entry , found inside Crystal Reports as Page supression, i think you will all get the jist :) -------------------------------------------------------------- if {crNettCrystal.PaxCount} > 36 and pagenumber > 2 then false else if {crNettCrystal.CanxPublishedFareCount} + {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CharterCount} > 2 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} > 2 and pagenumber = 3 then false else // stu if {@SegCount} < 5 and {crNettCrystal.CanxPropCount} + {crNettCrystal.CanxCarHireCount} + {crNettCrystal.CanxSightSeeingCount} + {crNettCrystal.CanxTourCount} < 3 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} + {crNettCrystal.GroundAmendmentCount} < 3 and pagenumber = 3 then true else if {@SegCount} = 4 and {crNettCrystal.GroundAmendmentCount} > 0 and pagenumber =3 then false else if {@SegCount} = 4 and {crNettCrystal.FlightAmendmentCount} = 2 and {@SchedFlightCancCount} = 2 and pagenumber =3 then false else if {@SegCount} = 5 and {crNettCrystal.FlightAmendmentCount} = 2 and pagenumber =3 then false else if {@SegCount} > 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 3 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} = 3 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 2 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false //else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and {@InsCount} >0 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} = 0 and {@Accom} + {@CarCount} < 3 and {crNettCrystal.CanxCarHireCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 5 and {@ChartCount} =0 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true // stu else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true else if {@SegCount} = 9 and {@Accom} =4 and pagenumber = 4 then false else if {@SegCount} = 5 and {@Accom} + {@CarCount} =5 and {@InsCount}

    T S 2 Replies Last reply
    0
    • D Dave B

      May I be so bold to suggest a new competition, sorry no prizes here, just satisfaction that you are a good programmer. How about a worst code comp. Heres my entry , found inside Crystal Reports as Page supression, i think you will all get the jist :) -------------------------------------------------------------- if {crNettCrystal.PaxCount} > 36 and pagenumber > 2 then false else if {crNettCrystal.CanxPublishedFareCount} + {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CharterCount} > 2 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} > 2 and pagenumber = 3 then false else // stu if {@SegCount} < 5 and {crNettCrystal.CanxPropCount} + {crNettCrystal.CanxCarHireCount} + {crNettCrystal.CanxSightSeeingCount} + {crNettCrystal.CanxTourCount} < 3 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} + {crNettCrystal.GroundAmendmentCount} < 3 and pagenumber = 3 then true else if {@SegCount} = 4 and {crNettCrystal.GroundAmendmentCount} > 0 and pagenumber =3 then false else if {@SegCount} = 4 and {crNettCrystal.FlightAmendmentCount} = 2 and {@SchedFlightCancCount} = 2 and pagenumber =3 then false else if {@SegCount} = 5 and {crNettCrystal.FlightAmendmentCount} = 2 and pagenumber =3 then false else if {@SegCount} > 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 3 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} = 3 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 2 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false //else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and {@InsCount} >0 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} = 0 and {@Accom} + {@CarCount} < 3 and {crNettCrystal.CanxCarHireCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 5 and {@ChartCount} =0 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true // stu else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true else if {@SegCount} = 9 and {@Accom} =4 and pagenumber = 4 then false else if {@SegCount} = 5 and {@Accom} + {@CarCount} =5 and {@InsCount}

      T Offline
      T Offline
      Tom Archer
      wrote on last edited by
      #2

      That gives me a headache X| Cheers, Tom Archer Author - Inside C#, Visual C++.NET Bible

      B 1 Reply Last reply
      0
      • D Dave B

        May I be so bold to suggest a new competition, sorry no prizes here, just satisfaction that you are a good programmer. How about a worst code comp. Heres my entry , found inside Crystal Reports as Page supression, i think you will all get the jist :) -------------------------------------------------------------- if {crNettCrystal.PaxCount} > 36 and pagenumber > 2 then false else if {crNettCrystal.CanxPublishedFareCount} + {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CharterCount} > 2 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} > 2 and pagenumber = 3 then false else // stu if {@SegCount} < 5 and {crNettCrystal.CanxPropCount} + {crNettCrystal.CanxCarHireCount} + {crNettCrystal.CanxSightSeeingCount} + {crNettCrystal.CanxTourCount} < 3 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} + {crNettCrystal.GroundAmendmentCount} < 3 and pagenumber = 3 then true else if {@SegCount} = 4 and {crNettCrystal.GroundAmendmentCount} > 0 and pagenumber =3 then false else if {@SegCount} = 4 and {crNettCrystal.FlightAmendmentCount} = 2 and {@SchedFlightCancCount} = 2 and pagenumber =3 then false else if {@SegCount} = 5 and {crNettCrystal.FlightAmendmentCount} = 2 and pagenumber =3 then false else if {@SegCount} > 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 3 then false else if {@SegCount} < 5 and {@Accom} + {@CarCount} + {@SightSeeCount} + {@TourCount} > 3 and pagenumber = 4 then false else if {@SegCount} = 3 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 2 and {crNettCrystal.CanxNettFareCount} + {crNettCrystal.CanxPublishedFareCount} > 0 and pagenumber = 3 then false //else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and {@InsCount} >0 and pagenumber = 3 then false else if {@SchedCount} = 0 and {@ChartCount} = 0 and {@Accom} + {@CarCount} < 3 and {crNettCrystal.CanxCarHireCount} > 0 and pagenumber = 3 then false else if {@SegCount} = 5 and {@ChartCount} =0 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true // stu else if {@SchedCount} = 0 and {@ChartCount} < 5 and {@Accom} + {@CarCount} < 3 and pagenumber > 2 then true else if {@SegCount} = 9 and {@Accom} =4 and pagenumber = 4 then false else if {@SegCount} = 5 and {@Accom} + {@CarCount} =5 and {@InsCount}

        S Offline
        S Offline
        SimonS
        wrote on last edited by
        #3

        I think someone needs to send Crystal Decisions a mail with the subject: code generation shouldn't = code obfuscation. At least they bothered to plug in line breaks. Cheers, Simon "From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.

        1 Reply Last reply
        0
        • T Tom Archer

          That gives me a headache X| Cheers, Tom Archer Author - Inside C#, Visual C++.NET Bible

          B Offline
          B Offline
          Brian Delahunty
          wrote on last edited by
          #4

          Tom Archer wrote: That gives me a headache What gives you a headache... as soon as I open that post I faint and then I wake up and the post has closed.. no idea what's in it. *sigh* Regards, Brian Dela :-)

          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