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
jony neuemonic
Nov 13, 2009


https://github.com/godlygeek/tabular

This also works well, though I never could figure out how to align properly on '=>'.

Adbot
ADBOT LOVES YOU

Dicky B
Mar 23, 2004

I haven't tried tabular. With Align that's as simple as typing :Align =>

Marsol0
Jun 6, 2004
No avatar. I just saved you some load time. You're welcome.

fidel sarcastro posted:

https://github.com/godlygeek/tabular

This also works well, though I never could figure out how to align properly on '=>'.

code:
:Tab/=>
Though you'll probably do it on a selection.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Tabularize (and I imagine Align) work by searching up and down till they hit lines that don't match the aligning characters, so usually they don't need a selection.

I use tabularize a lot for my CSS, makes it much nicer to read by left aligning all the properties, it just kicks in whenever I type <property-name>: , not entirely necessary but since the automation tools are there, may as well use them.

TheresaJayne
Jul 1, 2011

feedmegin posted:

Hard drive? My first code was on a zx spectrum's tape drive somewhere. Kids these days :corsair:

I still have a pile of C30 cassettes for my old zx81...

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Volte posted:

Here is a picture of that assignment I found. It was so ridiculous I just had to take a photo (sorry it was from before I owned a phone with a decent camera). The assignment was to take an integer and print the word representation of it, which I did by recursively breaking the number up into three digit groups. The correct way was a massive case statement. When I confronted him about it he babbled something about not understanding my code and that he couldn't read the comments because they weren't green and so he couldn't tell where the comments stopped and the code began. I failed this assignment, other people got 100% even if their code didn't compile or make sense.

I feel you buddy. I had a CS course where the professor (who didn't know what she was on about and was clearly teaching because she couldn't hack it as an engineer) was talking about something... unfortunately I can't remember the exact case.

Anyways, she mentions it during class, and I raise my hand, and I point out, "yeah, I'm not sure that's true. In practice, wouldn't it be better if ____ ?" she responded with a general "no this is better" and just ignored me, but I countered with "Yeah I'm pretty sure I could get a Knuth quote telling you the exact opposite" and she just kinda hand-waived it away "oh sure sure".

Then we get the midterm, and that exact situation comes up as a question. I know she just wants me to say "Yes because..." but I take the time to say "No; you could say ____ but ____" and I give all my examples, I quote Knuth and poo poo, I write up two pages front and back explaining every nuance of the issue.

I get my midterm back, and I got 0 points for that question. Kid next to me just wrote "Yes." :downs: and got full credit.

I went to argue with her, and she just said "come to me during my office hours". I went to her office, and she's out of town for two weeks. She comes back, I go to her office, and "Oh this test was two weeks ago, its too late to dispute" :argh:

Some professors really hate that their job involves education.

Zaphod42 fucked around with this message at 18:40 on Jul 29, 2013

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


Zaphod42 posted:

hosed up story

That poo poo is worth going to the dean over, dude.

jony neuemonic
Nov 13, 2009

Dicky B posted:

I haven't tried tabular. With Align that's as simple as typing :Align =>

:doh:

Apparently it's just as easy in Tabular (:Tabularize /=>/), but it didn't work using the shortcut set up in spf13. It's me, guys. I'm the coding horror.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Beamed posted:

That poo poo is worth going to the dean over, dude.

I almost did, but I had just previously had an experience where the school charged me $200 for a late fee, even though I shouldn't be charged the late fee, tell me there was nothing I could do about it, and then shuffle me back and forth between two different departments until I gave up. As a result, I could barely afford to eat for awhile.(poor college student, paying my own way by working through college)

So at first I was like "I'm mad as hell, and I'm not going to take it anymore!" but after awhile it was just "gently caress, I'm going to get a decent grade in that class anyways, but there's things for other courses that need more of my attention than raising a stink to the dean..." :smith:

Yeah I guess I should have. Although I'd probably have just been ignored.

WHERE MY HAT IS AT
Jan 7, 2011
There's a similar plugin called sublime align for sublime text if anyone else uses that.

The Velour Fog
Apr 21, 2010
Here's a fun one I ran into the other day - as best as I can remember:

php:
<?
$query = "declare @insertquery NVARCHAR='BULK INSERT mytable from '".db_escape($file) . 
"'with (fieldterminator=char(9), rowterminator=char(10), FORMATFILE='" . db_escape($fmtfile) . "'); EXEC @insertquery;";

$db->execute($query);
?>
I tried to match the capitalization that was used as best I could.

Now, I know how this got written - they probably wrote the bulk insert query in SQL server (where you can't dynamically specify the file to bulk insert using a variable). But... then they ended up writing dynamic SQL within a PHP string. I nearly had to leave for the day.

I found this little masterpiece after my company switched the way we escape strings to start using unicode, and all of a sudden there was an unexpected 'N' appearing in the query making it fail - for the unfamiliar, MSSQL specifies unicode strings like N'My String'.

(and yes, not using PDO/prepared statements is another horror)

The Velour Fog fucked around with this message at 03:48 on Jul 30, 2013

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop
I've never seen such terrible code as written by people for the Microchip PIC series of processors. It's honestly a flat out blacklist for me if I find that a potential contractor uses them. They seem to be universally used by hobbyists who ask other hobbyists for examples of how to do things and the terrible code festers and breeds on their forums.

code:
            if((UART_Rx_PC_Index >= 1) && (UART_Rx == 0x0d)){
                Process_Valid_Rx_PC_Data_Packet = 1;
            }
...
            if((UART_Rx_PC_Index == 0) && (UART_Rx == 0x2b)){
This is for an ASCII-based serial interface, that's not some kind of binary end-of-frame marker, it's newline endings and + beginnings. I guess he didn't realize you could compare to '\n' and '+' - but "didn't realize you could" pretty much sums up PIC programmers.

code:
            Rx_PC_Command = 100 * (UART_Rx_PC[1] - 0x30);
            Rx_PC_Command = Rx_PC_Command + 10 * (UART_Rx_PC[2] - 0x30);
            Rx_PC_Command = Rx_PC_Command + (UART_Rx_PC[3] - 0x30);
This isn't the most horrible thing, although it makes every input a zero-padded decimal limited to 255. The problem is it's cut&paste a good dozen times around the code. Throw in 0x30 instead of '0' for consistency. Of course Rx_PC_Command is 8-bit so if you send it +456 it silently calls command #200. Hope that's what you want!

Before you ask, of course he uses a case statement for the dozens of possible Rx_PC_Command options, right?

code:
if(Rx_PC_Command == 20){  // command 20 activity
  ...
}
if(Rx_PC_Command == 21){  // command 21 is
   ...
}
if(Rx_PC_Command == 22){  // command 22 is
   ...
}
I hope you don't typo anywhere, but the real horror is not using a header and symbolic names. You have to peruse a good 200+ lines of code to understand the commands.

But Harik, you might ask, obviously with a complex user interface there would be protocol documentation, right? Of course there is - in the form of an email giving usage examples for a handful of the commands. The rest is an adventure in code spelunking.

code:
       while(Size_Of_Command_Packet_Counter < Size_Of_Command_Packet){
            WriteUART2(API_Get_Local_Address_High[Size_Of_Command_Packet_Counter]);
            Delay(Inter_Byte_Delay);        //Delay is needed to prevent uC UART Tx buffer overflow
            Size_Of_Command_Packet_Counter++;
        }
Status registers? Who needs 'em! Also what's a 'for' loop and why would you ever index with a single-character variable name. Better to scatter dozens of unwieldy-named variables throughout the scope. Better hope that Inter_Byte_Delay is calculated right, too, because if it's too short you'll start getting corruption on long enough outputs.

Of course, the coup-de-grace on that last little snippet:
code:
       printf("ATID%x\r",Rx_PC_Command_2);
       Delay(Inter_Byte_Delay);        //Delay is needed to prevent uC UART Tx buffer overflow
       printf("more stuff");
I'm sure a UART can spit out 7 characters as fast as one, right? The only thing making this code work at all is that the system library printf already does the inter-byte delays properly. I think he meant "Delay(Command_Delay_Time); // Delay is needed to prevent uC UART Tx buffer overflow". I'm including the full statement because every use of Delay() in this code has that exact same comment, no matter what the delay is for.

code:
unsigned char Wire_Packet_Type_One[] = {0x7e,0x00,0x00,0x10,0x01,0x00,0x13,0xa2,0x00,0x40,0x67,0x3b,0xf2,0xff,0xfe,
  0x00,0x00,0x47,0x75,0x69,0x6c,0x66,0x6f,0x13,0x64,0x00};
...
   void Send_Wire_Packet_One(char What_To_Do, char How_Big) {
       Wire_Packet_Type_One[14] = What_To_Do;
       Wire_Packet_Type_One[19] = How_Big;

       // ... bang it out over the UART using delays because I still don't know what a status register is.
    }

    void Send_Wire_Packet_Two(char A_Thing, char Another_Thing, char An_Argument) {
        Uart_2_Transmit_Buffer[0] = 0x7e;
        Uart_2_Transmit_Buffer[1] = 0x4d;
        ....
        Uart_2_Transmit_Buffer[Current_Uart_2_Transmit_Buffer_Position-3] = A_Thing;
        Uart_2_Transmit_Buffer[Current_Uart_2_Transmit_Buffer_Position-2] = An_Argument;
        Uart_2_Transmit_Buffer[Current_Uart_2_Transmit_Buffer_Position-1] = Another_Thing;
	Uart_2_Transmit_Buffer[Current_Uart_2_Transmit_Buffer_Position] = An_Argument;
	
    }
All structures sent over-the-wire are either prebuilt arrays of uncommented hex magic numbers or built and sent byte by byte with uncommented magic hex numbers and uncommented positions, with non-informative names. There's not a single struct {} in this entire codebase. For good measure, Uart_2_Transmit_Buffer[] is global and the function doesn't fill it all in, depending on other functions (and an interrupt handler) to fill in those parts. Good luck changing anything!

Oh, you may think he's not following convention and using mixed-case in defines - nope, any named position offset is a variable in the .data section that's not marked const.

All the #defines in the project are obviously cut&paste from examples, followed by this beauty:
code:
#define ADC_Conversion_Factor 5000.0/4095.0;
// surely this will throw a compile error and he'll have to fix it
void Check_Battery(){
    System_Battery_Voltage = Acquire_uC_ADC_CH(1) * ADC_Conversion_Factor;
// ... oh you lucky bastard.
Hopefully I've anonymized this enough, coming up with equally ridiculous variable names to what was in in the code was fun.

It also follows the Microchip PIC project management convention perfectly:

the entirety of main_project_file.c
code:
#include "project_code.c"
Apparently at one time they didn't have a linker or something, so the workaround was just to make it compile everything as one big file. I see this all the time in PIC code and I have no idea why, the compiler links seperate .c files just fine. It's even better in this case, since there's only a single file with any code in it at all. Gotta make that airstrip just like the ones we saw before.

Oh and just for good measure, how about some random memory corruption?

code:
char Unused_Array_For_Possible_Future_Work[5] = {0};  // global var
...
    New_Device_Type = RX_Buffer[Device_Type_Offset];

    Unused_Array_For_Possible_Future_Work[New_Device_Type] = New_Device_Type;
Guess what this high-quality code controls?

A remote-activated shock collar for people.

I'm sure nothing will go wrong.

Thankfully the redesign is with a different processor specifically so they won't try to get me to reuse any of this poo poo.

Edit: Sorry about the wide-post, preview showed the [code] box just truncating that dumb array.

Harik fucked around with this message at 04:09 on Jul 30, 2013

ephphatha
Dec 18, 2009




Harik posted:

But Harik, you might ask, obviously with a complex user interface there would be protocol documentation, right? Of course there is - in the form of an email giving usage examples for a handful of the commands. The rest is an adventure in code spelunking.

This is attitude is loving prevalent in the perl community.

http://search.cpan.org/~nigelm/HTML-Scrubber-0.09/lib/HTML/Scrubber.pm#METHODS posted:

First a note on documentation: just study the EXAMPLE below. It's all the documentation you could need

Also, be sure to read all the comments as well as How does it work?.

If you're new to perl, good luck to you.

Bunny Cuddlin
Dec 12, 2004

Zaphod42 posted:

I almost did, but I had just previously had an experience where the school charged me $200 for a late fee, even though I shouldn't be charged the late fee, tell me there was nothing I could do about it, and then shuffle me back and forth between two different departments until I gave up. As a result, I could barely afford to eat for awhile.(poor college student, paying my own way by working through college)

So at first I was like "I'm mad as hell, and I'm not going to take it anymore!" but after awhile it was just "gently caress, I'm going to get a decent grade in that class anyways, but there's things for other courses that need more of my attention than raising a stink to the dean..." :smith:

Yeah I guess I should have. Although I'd probably have just been ignored.

He doesn't actually think you should go to the dean, he's making fun of you for being an awful turd who argues with the professor and quotes Knuth in an intro to loving programming class. You're That Guy that everyone rolls their eyes at and complains about and sighs forlornly when they see on the first day of a new class.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Ephphatha posted:

This is attitude is loving prevalent in the perl community.

I like how this is the part you take notice of. :smith:

The code quality on this entire project is amazing. Looking over at the server side, It's both hideously over-engineered and under-designed at the same time with things "future proofed" in 4 layers of abstraction, yet trying to do anything requires either 100% top-down refactoring or hacking a side-channel through most of it. A perfect storm of scope creep, demo-itis and fresh CS grads first solo design coming together in one unmanageable mess.

ephphatha
Dec 18, 2009




It's what I do all day :smith:. I'd give examples of some of the code I work on but I haven't met anyone (outside of coworkers) who even knows what SQR is without googling yet.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Ephphatha posted:

This is attitude is loving prevalent in the perl community.
Because it's not a PIC thing or a Perl thing, it's a "look what I made" thing.

(edited because I don't want to start another petty argument)

Gazpacho fucked around with this message at 09:10 on Jul 30, 2013

Bunny Cuddlin
Dec 12, 2004
Ruby, everyone: http://ruby-doc.org/stdlib-1.9.3/libdoc/digest/rdoc/Digest/HMAC.html

Ruby docs posted:

CAUTION: Use of this library is discouraged, because this implementation was meant to be experimental but somehow got into the 1.9 series without being noticed. Please use OpenSSL::HMAC in the “openssl” library instead.

Deus Rex
Mar 5, 2005

Zaphod42 posted:

I feel you buddy. I had a CS course where the professor (who didn't know what she was on about and was clearly teaching because she couldn't hack it as an engineer) was talking about something... unfortunately I can't remember the exact case.

Anyways, she mentions it during class, and I raise my hand, and I point out, "yeah, I'm not sure that's true. In practice, wouldn't it be better if ____ ?" she responded with a general "no this is better" and just ignored me, but I countered with "Yeah I'm pretty sure I could get a Knuth quote telling you the exact opposite" and she just kinda hand-waived it away "oh sure sure".

Then we get the midterm, and that exact situation comes up as a question. I know she just wants me to say "Yes because..." but I take the time to say "No; you could say ____ but ____" and I give all my examples, I quote Knuth and poo poo, I write up two pages front and back explaining every nuance of the issue.

I get my midterm back, and I got 0 points for that question. Kid next to me just wrote "Yes." :downs: and got full credit.

I went to argue with her, and she just said "come to me during my office hours". I went to her office, and she's out of town for two weeks. She comes back, I go to her office, and "Oh this test was two weeks ago, its too late to dispute" :argh:

Some professors really hate that their job involves education.

Yeah, uh, maybe you should have quoted someone who knows what he's talking about, not this "Professor Knuth" guy who apparently couldn't even hack it as an engineer.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Deus Rex posted:

Yeah, uh, maybe you should have quoted someone who knows what he's talking about, not this "Professor Knuth" guy who apparently couldn't even hack it as an engineer.

But how awesome was Dragon's Lair?

1337JiveTurkey
Feb 17, 2005

I had a professor demonstrate how to use a membership function for some arbitrary data structure to find a member in O(n) time by removing members until the function returns false. I couldn't see in what plausible scenario that would actually be better than simply traversing the structure but I still dropped it when it wasn't going anywhere. In retrospect maybe she was trying to show that the upper limit for a search in a data structure with a O(1) membership function is O(n) but if it was she was wording it really weirdly.

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Volte posted:

Here is a picture of that assignment I found. It was so ridiculous I just had to take a photo (sorry it was from before I owned a phone with a decent camera). The assignment was to take an integer and print the word representation of it, which I did by recursively breaking the number up into three digit groups. The correct way was a massive case statement. When I confronted him about it he babbled something about not understanding my code and that he couldn't read the comments because they weren't green and so he couldn't tell where the comments stopped and the code began. I failed this assignment, other people got 100% even if their code didn't compile or make sense.

In more general terms, this is a major reason why I transferred from a large general university to a small technical school for my bachelor's. I have nothing against grad students, but they tend to know gently caress-all and care about your success even less. In my first school I think I saw most of my professors a total of three times: once on the first day of the term, once for the midterm, and once for the final.

Edit: Wow, I didn't pay attention to what page I was on. Sorry =/

Che Delilas fucked around with this message at 18:04 on Jul 30, 2013

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Harik posted:

I like how this is the part you take notice of. :smith:

The code quality on this entire project is amazing. Looking over at the server side, It's both hideously over-engineered and under-designed at the same time with things "future proofed" in 4 layers of abstraction, yet trying to do anything requires either 100% top-down refactoring or hacking a side-channel through most of it. A perfect storm of scope creep, demo-itis and fresh CS grads first solo design coming together in one unmanageable mess.

That's how overdesigned things tend to work out. I don't think I've ever seen preemptive abstraction that actually turned out to be the correct abstraction once it was actually needed.

EntranceJew
Nov 5, 2009

Plorkyeran posted:

That's how overdesigned things tend to work out. I don't think I've ever seen preemptive abstraction that actually turned out to be the correct abstraction once it was actually needed.

If a programming team is reasonably skilled coming up with sensible solutions as they are needed wouldn't be that much of a burden as long as refactoring time is budgeted for.

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

Is there a reason they can't just replace (what I assume is) their own implementation of HMAC with a small wrapper around OpenSSL, since they're already recommending that and it's part of the standard library?

Coffee Mugshot
Jun 26, 2010

by Lowtax

Isilkor posted:

Is there a reason they can't just replace (what I assume is) their own implementation of HMAC with a small wrapper around OpenSSL, since they're already recommending that and it's part of the standard library?

Why bother with continuously updating the wrapper when it shouldn't be there in the first place? I imagine they want to just totally yank this out of the next version.

Sticky Profits
Aug 12, 2011
Doing some refactoring of my own old code and came across this gem:

php:
<?
else {
   // Something that can't own an Item owns this Item
   return false;
}
?>
Wow, thanks Sticky Profits.

Hughlander
May 11, 2005

Isilkor posted:

Is there a reason they can't just replace (what I assume is) their own implementation of HMAC with a small wrapper around OpenSSL, since they're already recommending that and it's part of the standard library?

OpenSSL probably isn't a required library to run ruby? Ruby compiles on targets/platforms that OpenSSL doesn't? OpenSSLs license isn't compatible with Rubys at the source level? Could be any of them.

ExcessBLarg!
Sep 1, 2001

Hughlander posted:

OpenSSLs license isn't compatible with Rubys at the source level?
Yeah, this is the big one. Ruby cannot "silently" use OpenSSL in the background without license pollution.

Actually, Ruby and OpenSSL is fine, but Ruby scripts that are GPL licensed (without an OpenSSL linking exception), or Ruby scripts that use a GPLed module, cannot be lawfully distributed if they also link (actually, load) OpenSSL. Thus use of the OpenSSL module in Ruby must be very explicit. Amusingly, as Ruby does runtime "linking", the common interpretation of license issues means this program is not lawful to distribute:
code:
require 'openssl'
require 'readline'
Well, at least not in a functional sense with the requisite libraries. I guess it's OK to distribute with useless, but propery licensed stubs.

Pixelboy
Sep 13, 2005

Now, I know what you're thinking...

Scaramouche posted:

Man I can't believe you guys aren't down with your latin selves. I thought every programmer was classically educated.

I had a developer get pissy at me because I used the term "ex post facto" in a document.

return0
Apr 11, 2007

Pixelboy posted:

I had a developer get pissy at me because I used the term "ex post facto" in a document.

Why the gently caress would you?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

ExcessBLarg! posted:

Actually, Ruby and OpenSSL is fine, but Ruby scripts that are GPL licensed (without an OpenSSL linking exception), or Ruby scripts that use a GPLed module, cannot be lawfully distributed if they also link (actually, load) OpenSSL. Thus use of the OpenSSL module in Ruby must be very explicit. Amusingly, as Ruby does runtime "linking", the common interpretation of license issues means this program is not lawful to distribute:
code:
require 'openssl'
require 'readline'
Anyone claiming that the GPL prohibits a program licensed under it from linking to OpenSSL at runtime is just wrong.

McGlockenshire
Dec 16, 2005

GOLLOCKS!

Gazpacho posted:

Anyone claiming that the GPL prohibits a program licensed under it from linking to OpenSSL at runtime is just wrong.

The OpenSSL license requires that all software using it must include a blurb in the docs, like the four-clause BSD license. That clause is incompatible with the GPL, which requires that any linked software have terms that impose no more conditions than the GPL itself.

The FSF interpretation of GPL linking with regard to dynamic languages is that there is no such thing as dynamic linking in that context. That is, effectively a single statically linked binary is created every time the script runs. Therefore, yes, under the FSF's own interpretation of the GPL requirements, that snippet of Ruby is a GPL violation because the resulting software has contradictory license terms.

Nobody gives a poo poo if you do this with your own code, but the instant you begin distributing the conflicted script, you create confusion and possible legal issues. If the FSF's interpretation of the linking issue in dynamic languages wasn't so silly, it wouldn't be a problem.

shrughes
Oct 11, 2008

(call/cc call/cc)
My recent coding horror:

code:
static_cast<int64_t>(SIZE_MAX)

Zombywuf
Mar 29, 2008

McGlockenshire posted:

The OpenSSL license requires that all software using it must include a blurb in the docs, like the four-clause BSD license. That clause is incompatible with the GPL, which requires that any linked software have terms that impose no more conditions than the GPL itself.

The GPLv2 posted:

You may not impose any further restrictions on the recipients' exercise of the rights granted herein.

The BSD license requires attribution and the copyright notice. The GPL requires attribution and an appropriate copyright notice. I'm not seeing the conflict.

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

Zombywuf posted:

The BSD license requires attribution and the copyright notice. The GPL requires attribution and an appropriate copyright notice. I'm not seeing the conflict.

quote:

Copyright (c) <year>, <copyright holder>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the <organization>.

4. Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.


THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

He specifically referred to the above 4-clause BSD, which requires considerably more than attribution (which is the reason nobody's used it in years, moving on to 3- and 2-clause variants of the BSD license or other permissive licenses like the MIT and ISC licenses.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

McGlockenshire posted:

The FSF interpretation of GPL linking with regard to dynamic languages is that there is no such thing as dynamic linking in that context. That is, effectively a single statically linked binary is created every time the script runs. Therefore, yes, under the FSF's own interpretation of the GPL requirements, that snippet of Ruby is a GPL violation because the resulting software has contradictory license terms.
That interpretation actually says that the given snippet of Ruby is fine unless you're distributing memory dumps of the Ruby process. Contradictory copyright licenses on the binary simply means that you can't distribute the binary, and running binaries that you can't distribute is not exactly unusual.

coaxmetal
Oct 21, 2010

I flamed me own dad
from one of our scss files

code:
@import "../../../../../shared_static/static/css/stylesheets"; // i know this is garbage

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


Ronald Raiden posted:

from one of our scss files

code:
@import "../../../../../shared_static/static/css/stylesheets"; // i know this is garbage

Well at least it's honest! :shobon:

Adbot
ADBOT LOVES YOU

ReelBigLizard
Feb 27, 2003

Fallen Rib

The readme for some example code from a 3rd party vendor we're integrating with posted:

The PHP library source code and example is so lucid, it can practically serve as its own documentation

That is pretty much the entire document, which was a .docx.

The code is not lucid. I'd post some examples but it's under NDA, presumably to prevent merciless mocking on coding forums.

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