Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dren
Jan 5, 2001

Pillbug
If you hate recursive make systems why not try automake? Automake - because makefile syntax wasn't obscure and crazy enough already.

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
Automake is typically used recursively to generate recursive makefiles.

FlapYoJacks
Feb 12, 2009

omeg posted:

I'm working on a low-level C project that's mostly Linux, but now there is also a sizable Windows portion. I have an issue with "standards" for function return values: if it returns int (usually Linux), 0 is success 99% of the time. On Windows, functions (especially Windows APIs) usually return BOOL and of course then 0 is failure. There are also Windows functions that return Windows status codes and then 0 is success again. :negative:

Why don't you just return BOOL then on the Linux side? POSIX doesn't define a standard return for success or failure on functions AFAIK.

Or if you are passing the return status of a function onto the windows side why don't you create a small wrapper with popen?


code:

int popen_function(char *cmd)
{
    FILE *fp;
    FP = popen(cmd, "r");

    if ( fp == NULL )
    {
        return -1;
    }

    pclose(fp);
    return 0;
}

then later on you could do something like this:

code:
bool butt(void)
{
    char *cmd[512] ;
    /* SOME LOGIC */

    if ( snprintf(cmd, sizeof(cmd), "linux string goes here" ) > sizeof(cmd))
    {
        printf("error: %i\n", errno);
        return FALSE;
    }


    int i = popen_function(cmd);

    if (i == 0)
    {
        return TRUE;
    }
    else
    {
        return FALSE;
    }
}

Then just pass true or false to windows?

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Plorkyeran posted:

Automake is typically used recursively to generate recursive makefiles.

A few years ago some friends and I tried to make a tool to convert projects from makefiles to other ostensibly better build systems (and also to generate some charts and do some analysis of the project). Parsing poo poo and traversing dependency graphs isn't rocket science and we got a number of things working, but recursive makefiles were a bitch for a variety of reasons, and our tool only really worked right with non-recursive makefiles (recursive includes were fine though, for reasons that mostly stemmed from only one make(1) process doing all the work). We had a hell of a time demoing the thing because almost all of the large open source projects we could think of either had giant messes of recursive makefiles generated by autotools, or were using their own glob of spit, duct tape and bailing wire.

Freakus
Oct 21, 2000

Dietrich posted:

One of my coworkers just failed-over our MS-SQL cluster in a panic because :supaburn: "MEMORY USAGE HAS BEEN PEGGED AT 12.7 GIGS FOR THE LAST 7 DAYS!!!" :supaburn:
Catastrophic failure was obviously imminent.

Dren
Jan 5, 2001

Pillbug

Otto Skorzeny posted:

A few years ago some friends and I tried to make a tool to convert projects from makefiles to other ostensibly better build systems (and also to generate some charts and do some analysis of the project). Parsing poo poo and traversing dependency graphs isn't rocket science and we got a number of things working, but recursive makefiles were a bitch for a variety of reasons, and our tool only really worked right with non-recursive makefiles (recursive includes were fine though, for reasons that mostly stemmed from only one make(1) process doing all the work). We had a hell of a time demoing the thing because almost all of the large open source projects we could think of either had giant messes of recursive makefiles generated by autotools, or were using their own glob of spit, duct tape and bailing wire.

You couldn't parse the autotools stuff on its own without compiling the makefiles? It's just one more layer of cruft (two if you count autoconf and automake separately).

What were you guys trying to translate the makefiles into?

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

Otto Skorzeny posted:

A few years ago some friends and I tried to make a tool to convert projects from makefiles to other ostensibly better build systems (and also to generate some charts and do some analysis of the project). Parsing poo poo and traversing dependency graphs isn't rocket science and we got a number of things working, but recursive makefiles were a bitch for a variety of reasons, and our tool only really worked right with non-recursive makefiles (recursive includes were fine though, for reasons that mostly stemmed from only one make(1) process doing all the work). We had a hell of a time demoing the thing because almost all of the large open source projects we could think of either had giant messes of recursive makefiles generated by autotools, or were using their own glob of spit, duct tape and bailing wire.

Was that the tool I remember seeing that could convert 85% of all automake based projects into a readable and "maintainable" CMake build structure, or was that a different goon who was working on that?

Mr. Crow
May 22, 2008

Snap City mayor for life
The true coding horror: I'm being bitched at for not 'creating a design' for a task that took <30 minutes to implement and fully test.

So now I get to go back and spend probably 2+ hours "designing" the task out (manually mirror the code from source into EnterpriseArchitect, add explanations for stuff in a design doc and potentially add sequence diagrams to EA), getting it reviewed and addressing any 'defects' found.


An effective use of everyone's time.

Jewel
May 2, 2009

Mr. Crow posted:

The true coding horror: I'm being bitched at for not 'creating a design' for a task that took <30 minutes to implement and fully test.

So now I get to go back and spend probably 2+ hours "designing" the task out (manually mirror the code from source into EnterpriseArchitect, add explanations for stuff in a design doc and potentially add sequence diagrams to EA), getting it reviewed and addressing any 'defects' found.


An effective use of everyone's time.

Hey, if you're getting paid per the hour..! :shobon:

EAT THE EGGS RICOLA
May 29, 2008

This counts as a horror, I hope.

Jewel
May 2, 2009


That very last example doesn't have syntax to close the normal brackets of the function, I don't think. It's missing the end ')', and browsing the doc, there's no way to close that, I think. It forgets to add it if there's a "much <X>" in a "plz" (ie a function as an argument to a function call).

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

SAHChandler posted:

Was that the tool I remember seeing that could convert 85% of all automake based projects into a readable and "maintainable" CMake build structure, or was that a different goon who was working on that?
CMake was one of our targets, but we couldn't parse anything like 85% of make based projects (and I hope we didn't claim to). e: we did work with bash, vim and emacs though, which isn't nothing :)


Dren posted:

You couldn't parse the autotools stuff on its own without compiling the makefiles? It's just one more layer of cruft (two if you count autoconf and automake separately).

What were you guys trying to translate the makefiles into?

We could have parsed the autotools stuff separately, but for reasons of time and prior technical decisions we didn't. The gist of it is that we used a CPAN module to attempt to parse the makefile. The CPAN module, the name of which I don't recall, was calling make(1) with some flags that caused make to do a dry run and dump the results in some bespoke format, which the module then parsed and gave us as a tree. Our Perl code then dumped this into an XML-based intermediate format that we devised. The advantage of using this wrapper around make is that a shitton of the heavy lifting was done for us; the downside is that it blew up when recursive makefiles were used. We devised a scheme where we'd detect this and try to do our own traversal of the directory tree from the bottom up and sort of glue the results together, but it never got to the point where it worked very well (I'm not sure if I even pushed the branch, I was busy with interviews at the time and didn't prioritize the project).

We then had a Common Lisp program that read the intermediate file and did some analysis & generated reports, and a C# program that read the intermediate file and generated (or at least tried to generate) a CMake file and a Visual Studio project (I think it leveraged some COM objects to do the heavy lifting for the VS stuff). There was supposed to be a web frontend too but it never really worked.

This design was a result of Conway's Law and the limited time we had to work on it before we graduated (it started as a project for a class, and continued for another semester as a project for my alma mater's program wherein students are paid to work on open-source software), more or less.

Blotto Skorzany fucked around with this message at 23:34 on Nov 4, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Why?

Macichne Leainig
Jul 26, 2012

by VG
code:
Trace.WriteLine("oops, an error occurred, here's the raw response: {0}", content);
Yeah, that's not going to get you very far, buddy.

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

Otto Skorzeny posted:

CMake was one of our targets, but we couldn't parse anything like 85% of make based projects (and I hope we didn't claim to). e: we did work with bash, vim and emacs though, which isn't nothing :)

Ahh ok. It might be a different project, because I think this was for a commercial project with the intent of an eventual open source release. The image I remember seeing showed someone successfully compiling gcc with a single CMakeLists.txt file generated from its build tree. They weren't running the tests though :v:.

EDIT: This was a few years ago, so I may be blowing things out of proportion.

MononcQc
May 29, 2007

My Rhythmic Crotch posted:

We had to get FDA approvals to certify everything as medical devices, and we usually had to get local regulatory permits for making radiation.

:magical: that was pretty good story.

_aaron
Jul 24, 2007
The underscore is silent.

Mr. Crow posted:

The true coding horror: I'm being bitched at for not 'creating a design' for a task that took <30 minutes to implement and fully test.

So now I get to go back and spend probably 2+ hours "designing" the task out (manually mirror the code from source into EnterpriseArchitect, add explanations for stuff in a design doc and potentially add sequence diagrams to EA), getting it reviewed and addressing any 'defects' found.


An effective use of everyone's time.

I've seen a few of your posts in this thread (and maybe others?), and I swear you work at my old job. This process (and, in particular, Enterprise Archtitect) sounds very familiar. Dayton, Ohio?

Mr. Crow
May 22, 2008

Snap City mayor for life

_aaron posted:

I've seen a few of your posts in this thread (and maybe others?), and I swear you work at my old job. This process (and, in particular, Enterprise Archtitect) sounds very familiar. Dayton, Ohio?

I'd PM you but, well... looking at your post history I'm also positive that I do; does your last name rhyme with fray?

zokie
Feb 13, 2006

Out of many, Sweden

Ithaqua posted:

MSBuild isn't too bad in the .NET world. It can still suck if you overextend it and try to deploy software using build tasks, but actually compiling software is pretty painless.

We're having trouble with Click-Once at work and our automated build process. It sounds like you have experience with troubles here?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

zokie posted:

We're having trouble with Click-Once at work and our automated build process. It sounds like you have experience with troubles here?

Yeah, PM me. I haven't used clickonce since like 2007, though.

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

My Rhythmic Crotch posted:

Which brings us to ... testing. The logistics of these treatment centers made testing nearly impossible. Contracts stipulated that the customer had full access to the center for something like 18 hours a day, 6 days a week. And during that time, only production code was allowed. So that left us with basically nights and weekends for testing software. The cyclotron is a fickle beast, and extracting beam during those small windows of time (I'm just a software guy, not a cyclotron expert) can be really loving tricky. So some features would get tested for maybe only an hour or two at one center before being given the final blessing and put into production.

I'm pretty sure my sister was treated on one of your machines in Indiana. You'll be pleased to know that you don't appear to have murdered her.

Sadly I never got a tour of the cyclotron :(

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
So I just had a fun exercise in trying to explain to Senior Devs that boostrap is in fact static unless you enable responsive, and that you can make it change the width of the columns by setting the @media thingy (fiik the right term for viewport meta data crap, I'm the FNG still) and that one of the static options would fix our problem.

tl;dr we're using bootstrap without setting the viewport size, our effective minimum screen width for our client is 1024px - width of our left hand nav which is too small for the default, so span12 does not fit. There's also a senior dev insisting it should all be relative to parent even though it isn't per the documentation because it did it in his last job and as far as he remembers it was not set to responsive.

How do you delicately handle "actually you're wrong and here's why"? Just politely repeat and hope for the best? We ended up just going "Meh, too late now, span9 max" and "let's trim pixels from our left hand nav" and meh.

I also found out that we just did twice over the amount of work needed for something that was easy as poo poo. Client wants us to display dates a certain way and store them in the db another. Our view models are not strongly typed - strings mostly, sometimes ints - and we already have the culture settings set up to parse the date string format the way Client wants it to a plain old date time, and then the plain old date time is already set to save things to the database the way they want it.

Instead, we had this circuitous reinvention of the wheel done with knockout and computed things and custom bindings and poo poo to save the date in the dd/mm/yyyy format and display it as dd-mmm-yyy. So I bother to check the drat documentation and it could have been done with altfield and altformat.

Then again we didn't even have to do that, we could have just had strings for our viewmodels from the date picker and then converted to DateTimes before it was WSDL'd down to the DB, and then from there just let .NET do its job for us. But instead we change the format of the string that turns into A DateTime typed field anyway and I don't know why

:shepface:

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

2banks1swap.avi posted:

How do you delicately handle "actually you're wrong and here's why"? Just politely repeat and hope for the best?

Bring data. Failing that, bring convincing anecdotes in the form of a demo or screenshots. Failing that, write "I told you so" in your diary, forget about it, and live another day :)

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
I just posted the documentation and said "that's what it says and what it does" and they didn't care :downs:

celestial teapot
Sep 9, 2003

He asked my religion and I replied "agnostic." He asked how to spell it, and remarked with a sigh: "Well, there are many religions, but I suppose they all worship the same God."
code:
if (!userPassword.matchRegex("..................") then
          $PASSWORD_NOT_LONG_ENOUGH = true
end

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

celestial teapot posted:

code:
if (!userPassword.matchRegex("..................") then
          $PASSWORD_NOT_LONG_ENOUGH = true
end

must have been written by a visual learner

Mr. Crow
May 22, 2008

Snap City mayor for life

2banks1swap.avi posted:

I just posted the documentation and said "that's what it says and what it does" and they didn't care :downs:

Find a new job.

FlapYoJacks
Feb 12, 2009

2banks1swap.avi posted:

I just posted the documentation and said "that's what it says and what it does" and they didn't care :downs:

Time to :yotj: !

Smarmy Coworker
May 10, 2008

by XyloJW
Not code, however, a UCD (so it is related to code):


a grad student did this

fritz
Jul 26, 2003

ARACHNOTRON posted:

Not code, however, a UCD (so it is related to code):


a grad student did this

Dang those people got long arms.

No Safe Word
Feb 26, 2005

ARACHNOTRON posted:

Not code, however, a UCD (so it is related to code):


a grad student did this

If all I saw were diagrams like this I'd be inclined to agree with the guy who said diagrams are categorically bad.

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

ARACHNOTRON posted:

Not code, however, a UCD (so it is related to code):


a grad student did this

This is the use case diagram for the professor cutting off his own head.

Smarmy Coworker
May 10, 2008

by XyloJW
Everything else from presentations this week at least made sense, if some of it was obviously rushed or not completely thought through
but god, drat,

1337JiveTurkey
Feb 17, 2005

I'm trying to interpret any of that diagram in a remotely coherent manner given how the other arrows are being used in context. Just the quantifiers on the edges from salary to the users is its own little delight. So I guess it's possible for multiple administrators to share a salary but they're not allowed to have multiple salaries unlike generic users and housekeepers. Or maybe I'm interpreting it wrong since it's a single use case and maybe it's valid for administrators to have many different salaries, but not when dealing with the same customer.

ManoliIsFat
Oct 4, 2002

1337JiveTurkey posted:

I'm trying to interpret any of that diagram in a remotely coherent manner given how the other arrows are being used in context. Just the quantifiers on the edges from salary to the users is its own little delight. So I guess it's possible for multiple administrators to share a salary but they're not allowed to have multiple salaries unlike generic users and housekeepers. Or maybe I'm interpreting it wrong since it's a single use case and maybe it's valid for administrators to have many different salaries, but not when dealing with the same customer.

I think all it's really saying is each of these people or systems "touch" eachother. Without arrows, it's just seems like "this is related to that".

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
Did someone say use cases?

IT BEGINS
Jan 15, 2009

I don't know how to make analogies

SupSuper posted:

Did someone say use cases?


Fear me, for I am Lord Use Case

Seriously though, what the hell. I think at a certain point you have to go 'these guys just look like they are firing lasers at each other, maybe this isn't a useful diagram any more.'

Pilsner
Nov 23, 2002

Looks like the typical newbie use case diagram by someone attempting to apply methods they read about briefly.

It also looks like the use case diagrams our company's experienced project managers churn out. Not to mention "flow diagrams" that are pretty much just a drawing of 10 boxes in sequence, each containing "do this" and "do that".

Smarmy Coworker
May 10, 2008

by XyloJW

SupSuper posted:

Did someone say use cases?

Ahahaha

Adbot
ADBOT LOVES YOU

Mr. Crow
May 22, 2008

Snap City mayor for life

SupSuper posted:

Did someone say use cases?

The first couple instantly made me visualize Star Wars and the Emperor electrocuting somebody.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply