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
pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
This is the best (experimental) graphical implementation of (a subset of) programming I have yet seen. I agree that in principle there are many potential benefits to be had from a more graphical approach to programming, but this has been tried in the past and is at the very least difficult to make more usable than traditional text-based approaches. It is also irrelevant to our choices of variable names in the software we will be writing for the next 5 to 50 years.
http://subtextual.org/subtext2.html

Adbot
ADBOT LOVES YOU

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
I tend to use func( args ) and keyword ( args ), but void Class :: Method ( args ) is just silly.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
The difference would be that we'd be allowed to have a "post hot programmer chicks and the most CoCeddest images u got" thread.

This technique works great on PS3 by the way, you can dedicate one SPU to prime flag encoding and one SPU to decoding, potentially leaving 4 or 5 for the rest of the game or application to make use of, and you can use 128-bit values to store more flags than ever!

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
As I understand it, Java strings are immutable, so as long as the compiler can prove that the variable in the loop test always references the same string object, it can pull the call to length() out of the loop.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!

JoeNotCharles posted:

code:
Foo f;
if (someVal == f.CONSTANT)

This reminds me of my very early Java days before I was entirely clear on the concept of static members :shobon:

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
The Something Awful Forums > Discussion > Serious Hardware / Software Crap > The Cavern of COBOL: throw new Exception("hahaha, I bet you did not understood the code");

http://www.urubatan.info/2008/11/commenting-source-code-is-only-for-the-weak/

He turns some clear straightforward code into...I don't know :psyduck:

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
code:
BufferedReader br = new BufferedReader(new FileReader(fle.toString()));
I've not done Java in years but this looks perfectly clear to me.

code:
  String lin;
  while(true) {
    lin = br.readLine();
    if (lin == null)
      break;

    con.append(lin).append("\n");
  }
I actually prefer the C-style while((var = getNext()) != NULL) style since it's very easy to spot once you know it, and it keeps some of the logic out of the body of the loop.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
http://www.codeproject.com/KB/dotnet/OptLocking_PrefixTable.aspx

code:
public object DeepCopy(object value)
{
    try
    {
        return value;
    }
    catch (Exception ex)
    {
        throw ex;
    }
}
Hmm.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!

tef posted:

this for new cobol title

Hell yes.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
code:
with GetRes1() as r1, GetRes2() as r2, GetRes3() as r3:
    ...
:smug:

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!

Lexical Unit posted:

code:
std::complex<double> d = (0.0, 1.0); // why's it getting it backwards? Whatever.

This is a little gem of a horror :3:

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
http://arstechnica.com/business/news/2010/01/how-a-stray-mouse-click-choked-the-nyse-cost-a-bank-150k.ars

quote:

On November 14, 2007 at 3:20pm one of Credit Suisse's trading algorithms suddenly went haywire, and, in a few moments, sent hundreds of thousands of bogus requests to the exchange.
[...]
The exchange's filing, released a little over a week ago, has the details of precisely what drove the algorithm haywire—it was a trader who accidentally double-clicked an icon in a trading program's interface, when he should've single-clicked.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
Relevant http://prog21.dadgum.com/21.html

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
Who's ready for some MATLAB?

http://abandonmatlab.wordpress.com/2012/05/11/errors-and-crashes/

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
I don't want to keep linking this blog but this is amazing.

http://abandonmatlab.wordpress.com/2012/05/17/heres-another-way-to-crash-matlab/

code:
function pushdown(N, crash)
    %an N of more than about 1000000 with crash=1 is interesting.
    a = {};
    for i = 1:N
        a = {rand() a};
    end

    if ~exist('crash', 'var') || ~crash
        %feed it to matlab's deallocator one piece at a time, or it will choke.
        for i = 1:N
            a = a{2};
        end
    end
end
If you set crash=1, only the first part of the code runs. It creates a linked list of N items using cell arrays for the nodes. When MATLAB tries to garbage collect it, it will crash. The 'fix' is the guarded code below it, which manually pops from the head of the list so the garbage collection can process it one node at a time.

People pay money for this.

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
There is no good code, only awful code and REALLY awful code.

Adbot
ADBOT LOVES YOU

pseudopresence
Mar 3, 2005

I want to get online...
I need a computer!
Isn't the only requirement in the C++ standard that long double be at least as precise as a double?

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