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
Max Facetime
Apr 18, 2009

Used to be that Comp Scis got taught Object-Oriented Design in Java so they went on to inflict the most horrible AbstractAbstractUiFactory class hierarchies on whoever hired them first.

Anyone not guilty raise their hand: :colbert:

Nowadays these crimes are committed in a wide variety of up-and-coming-and-going programming languages no-one decent has heard of.

Well, turns out these new amazing features have all been invented in the 60's and they are all really easy to rewrite in readable and maintainable Java (or C# if you lean that way) and any StrategyInterpreterDelegateImplementations you only inflict on yourself.

This is really the best time to be an experienced software developer, or maybe a programming language biologist would be a better fitting term. Almost every day there's a new weird specimen to wonder, study, dissect and bring into the fold. But don't let that stop you.

Maybe misunderstood Python is really not "Shaka, when the walls fell." but really "Temba, his arms wide!"
Maybe Erlang on Desktop will unleash all (ALL!) the cores.
Maybe the Next Next Big Thing is totally going to be Rhino on Rails.

Maybe.


















Naaaaaaah :)

Adbot
ADBOT LOVES YOU

Max Facetime
Apr 18, 2009

OBAMA BIN LAUGHIN posted:

python is a really cool language

oooh, I meant to ask in the other thread about semantic web but it got closed


is the future semantic web going to let me open my phone and see both facebook AND twitter in the same list?

cos that would really be something

I bet it will make use of some really amazing languages

Max Facetime
Apr 18, 2009

Rufo posted:

what the gently caress are you on about

in the 60's when they were inventing modern computing they didn't know how to make a fast computer let alone a fast programming language

so they just invented all the language features and combined them in different ways to make slow and terrible programming languages because who can blame them, it was all new

so now that we have more computing power than we know what do with, and java pre-empted all to good language features to create the java ecosystem, what can we look forward to?

an endless stream of terrible remixes

Max Facetime
Apr 18, 2009

tef posted:

dynamic and static typing are for weenies.

hybrid typing is where it is at http://sage.soe.ucsc.edu/

you write types, eliminates them statically, or inserts runtime checks where it can't.

that's pretty neat in how everything gets a really specific type, but I can't see how you could write code like that without an ide figuring the types out for you

Max Facetime
Apr 18, 2009

and what's with every research language having a hardon for overloading the EqualsOrGreaterThan operator?

Max Facetime
Apr 18, 2009

here's a thing that happened with the auction house in a recently released game:

JerleMinara posted:

Hey if you want to actually use the AH, it turns out they did something really silly with the client UI that they guaranteed didn't test at all. (It's literally impossible to miss).actually it's pretty loving easy thing to miss if you only have a couple 1000 test items in the DB:

The whole meme about how it was "items that were already sold"? Yea, total bollocks. Basically Flash can't cleanly convert numbers over 10^14 to and from strings neatly so it goes bananas. So clicking buy keeps trying to buy a random itemID that's not even close to the actual itemID you want to buy. Or any itemID in the game.

guess you shouldn't use floats when manipulating your database IDs, who knew :shobon:

Max Facetime
Apr 18, 2009

trex eaterofcadrs posted:

sorry kid, it's true, every single person that i respect as a programmer will readily admit the human race is writing poo poo software at this stage of the game

a big problem is a culture where "i have to talk fast because I don't have time to listen" is encouraged. applied to software that becomes

"I have to get this code done before the customer changes their mind" and the corollary

"ok, that didn't work, maybe if I can get the code done so fast that they haven't even finished their sentence I can stump them" which is then sugarcoated as rapid application development (RAD!!!) or prototyping

I wouldn't say all software is poo poo, it's just the best it can be

Max Facetime
Apr 18, 2009

vapid cutlery posted:

the worst part of programming is developing software yea

Max Facetime
Apr 18, 2009

the worst part of sex is developing a boner

Max Facetime
Apr 18, 2009

Gazpacho posted:

i know crazy poo poo happens in space but if you cant even trust your ALU then you better shield that poo poo until you can

Attack of the Cosmic Rays!

Max Facetime
Apr 18, 2009

Otto Skorzeny posted:

good luck not doing any dynamic allocation in java!

here's some java that does very little dynamic allocation:

Java code:
package no.dynamic;
public class Allocation {
  public static void main(String[] args) {
    int a = Complex.create(1, 0);
    int b = Complex.create(0, 1);
    int c = Complex.add(a, b);
    System.out.print("Result is ");
    System.out.print(Complex.getReal(c));
    System.out.print(",");
    System.out.println(Complex.getImag(c));
  }

  static class Complex {
    static int create(int real, int imag) {
      int thiz = allocate(2);
      setReal(thiz, real);
      setImag(thiz, imag);
      return thiz;
    }

    private static void setReal(int thiz, int real) { set(thiz, 0, real); }
    private static void setImag(int thiz, int imag) { set(thiz, 1, imag); }
    static int getReal(int thiz) { return get(thiz, 0); }
    static int getImag(int thiz) { return get(thiz, 1); }

    static int add(int thiz, int that) {
      return create(getReal(thiz) + getReal(that), getImag(thiz) + getImag(that));
    }
  }

  public static int get(int thiz, int index) { return ints[objects[thiz] + index]; }
  public static void set(int thiz, int index, int value) { ints[objects[thiz] + index] = value; }

  public static int allocate(int amount) {
    objects[objectsOffset] = intsOffset;
    intsOffset += amount;
    return objectsOffset++;
  }

  private static int[] objects = new int[1000];
  private static int[] ints = new int[10000];
  private static int objectsOffset;
  private static int intsOffset;
}

Max Facetime
Apr 18, 2009

Shaggar posted:

sticking a thing into a slot and squeezing it is about all the lowest common denominator can handle

then the solution is obvious: retrofit existing gas pumps as pneumatic exchangers of rechargeable D-batteries. first it sucks the empty batteries out of the car, then it pushes recharged batteries in, and you pay based on how many you exchange

Max Facetime
Apr 18, 2009

Tiny Bug Child posted:

people who like static typing are the software conservatives

yeah, that's what the google guy is trying to say, but then he says a lot of things

quote:

I am a hardcore software liberal, bordering on (but not quite) being a liberal extremist.
...
In the liberal's view, static typing is analogous to Security Theater. It exists solely to make people feel safe.

but

quote:

static types yield better toolchain support. This is undeniably true today, and I have made it my life's work to ensure that it is not true tomorrow.
...
I'll assert that at some point in the next decade or so, static types will not be a prerequisite for world-class toolchain support.

so start preparing for a PHP IDE that adds little red marks next to code it can't verify to not be meaningless without running it

Max Facetime
Apr 18, 2009

lol javascript is slow!!!

Max Facetime
Apr 18, 2009

Otto Skorzeny posted:

even with cruise control you still need to steer

nah, just tape a few sandbags around it, slap on a V9 IonMonkey engine and ship it

Max Facetime
Apr 18, 2009

Cocoa Crispies posted:

not even the good kind of typing where the computer does all the easy but boring bullshit (see Mirah)

that looks like it's just hiding stuff instead of doing the easy and boring stuff (i.e. documenting the code)

Max Facetime
Apr 18, 2009

Win8 Hetro Experie posted:

that looks like it's just hiding stuff instead of doing the easy and boring stuff (i.e. documenting the code)

like this stuff:

mirah posted:

import java.util.ArrayList

list = ArrayList.new
sb = StringBuffer.new("Hello")
sb.append(", world")
list.add(sb)
puts list

Note again that no types are actually declared here, and the types of ‘list’ and ‘sb’ are inferred from the results of constructing ArrayList and StringBuffer.

inferred by who? me?? i'd rather not infer stuff when writing code, if at all possible

Max Facetime
Apr 18, 2009

and now that i'm actually inferring that piece of code it's borderline nonsense

who would use a List<StringBuffer> variable instead of List<String>? Nobody, but thanks to types being hidden the author never caught that stupid mistake

way to go showcasing the strengths of your own language :bravo:

Max Facetime
Apr 18, 2009

There is no single development, in either technology or in management technique, that by itself promises even one order-of-magnitude improvement in productivity, in reliability, in simplicity.

I believe the hard part of building software to be the specification, design, and testing of this conceptual construct, not the labor of representing it and testing the fidelity of the representation. We still make syntax errors, to be sure; but they are fuzz compared with the conceptual errors in most systems.

The principal effect of timesharing is to shorten system response time. As this response time goes to zero, at some point it passes the human threshold of noticeability, about 100 milliseconds. Beyond that threshold, no benefits are to be expected.

An order-of-magnitude gain can be made by object-oriented programming only if the unnecessary type-specification underbrush still in our programming language is itself nine-tenths of the work involved in designing a program product. I doubt it.

Moreover, at some point the elaboration of a high-level language creates a tool-mastery burden that increases, not reduces, the intellectual task of the user who rarely uses the esoteric constructs.

The first step toward the management of disease was replacement of demon theories and humours theories by the germ theory. That very step, the beginning of hope, in itself dashed all hopes of magical solutions. It told workers that progress would be made stepwise, at great effort, and that a persistent, unremitting care would have to be paid to a discipline of cleanliness. So it is with software engineering today.

Max Facetime
Apr 18, 2009

lol groovy

looked at an example briefly, went "that's simple, I got this" and produced this elegant piece of code:
code:
def json = hashmap as JSON
outputfile << json
except that wrote a slightly invalid json file, WTF?! turns out "as JSON" doesn't produce json, it produces some JsonFactory thing

the correct code was:
code:
def json = hashmap as JSON
json.render(outputfile)
naturally the useless custom eclipse-based IDE doesn't understand the code at all if I don't manually type every single type

Max Facetime
Apr 18, 2009

here's some more from the top of my head

- the time between changing something and logging the change can vary, think context switches
- one windows api for measuring time has 1ms resolution but ~15ms precision, this can be upped to 1ms precision when needed but it's a system-wide change
- queryperformancecounter has a much better precision but it's harder to turn into a proper timestamp
- different cores might run at slightly different speeds, causing measurements to drift

Max Facetime
Apr 18, 2009

how does ARC compare with RAII and C++11's move semantics?

Max Facetime
Apr 18, 2009

Gazpacho posted:

i dont see how either of those c++ things supports multiple references at all

sooo it's just a shared_ptr then?

Max Facetime
Apr 18, 2009

tef posted:

i tend to look for attitude over ability. as for hard problems, most of coding is trivial problems, made hard.

He then goes on to list, with no apparent irony, several unnecessarily hard problems that all involve software that someone somewhere mashed out the logic and library code for to just do it.

tef posted:

Learning a new API is hard. Debugging is hard. Documentation is hard. Testing is hard. Builds are hard. Versioning is hard. Coding is mostly mashing out the logic and library code to do it.

you can get away with writing really dumb code to do what you want.

Yes, there's no problem with my code to do it, what I want, it's all that other code to do stuff, what someone else managed to think up that's involved that makes everything unnecessarily difficult.

Max Facetime
Apr 18, 2009

tef posted:

the implication is that 'solving a hard problem' is people who can 'not invented here' up some savagely optimised algorithms to do it. I then mention several actual hard problems which are not covered by these algorithmic blinkers.

What, so this list

tef posted:

Learning a new API is hard. Debugging is hard. Documentation is hard. Testing is hard. Builds are hard. Versioning is hard.

is supposed to be ACTUALLY hard problems? that just makes the whole thing even dumber

Learning a new API is only hard if the thing the API does is actually hard or the API is done in an unnecessarily hard way.
Debugging is only hard if your code doing what you want doesn't include "fails reliably".
Documentation is only hard if the interface to your code is done in an unnecessarily hard way.
Testing is only hard if you are having trouble expressing what you want your code to do.
Builds are only hard if you insist on coding and producing an executable to be two separate activities.
Versioning is only hard if tomorrow you don't want doing what you want to include doing something reasonable with the stuff you wanted done today.

But never mind all that stuff that requires someone to figure out what is it that the code must do, coding is just mashing out some dumb code from logic and libraries

Max Facetime
Apr 18, 2009

tef posted:

i can only assume you live in a magical land where the build system isn't cobbled together, the test suite is as polished as if it came from jonny ive's bumhole, debugging requires no reverse engineering, and deployments and version conflicts are simply the users error and/or problem.

no, but I recognize that any problems with these are self-inflicted and stem from them not being considered part of the software product from the beginning

"write some dumb code because coding is mostly trivial" certainly doesn't help

E:

tef posted:

i'm pretty sure you were raging so hard, you forgot to make a sentence with words that follow each other.

I actually read over that one quite a few times to make sure it was syntactically correct

Max Facetime
Apr 18, 2009

WHOIS John Galt posted:

'but it's syntactically correct' is the worst defense for writing a poorly written sentence

in criticizing others for missing the big picture I may focused too much on trivialities myself

isn't that ironic

tef posted:

yep. it turns out that software is easy when you get everything right first time.

or failing that, getting everything right to make software easier is an actual priority

tef posted:

some people like to use fancy bits of coding to avoid an extra line or variable.
this pops up all the time in coc: "I have this 3 line statement that's really clear and obvious, but I want to write something smaller and cleverer".

there's a lot of that going around, I think quite a few people in the 'pos would rather turn this

homercles posted:

Java code:
  private static <T extends Encodable & Decodable<? super T> & Comparable<? super T>> void diffMerge(
    T trafExisting, DataInputStream fhExisting,
    T trafUpdate, DataInputStream fhUpdate,
    DataInputStream fhDiff)
  {
      // simple stuff can be made hard in java
  } 

into this

JavaScript code:
function diffMerge(trafExisting, fhExisting, trafUpdate, fhUpdate, fhDiff) 
{
  // ah, sweet serenity (where did i put my notes?)
}
(the first one is a private implementation detail so i'm not gonna say it's badly designed)

Max Facetime
Apr 18, 2009

tef posted:

i find it more you read my posts with a view to dissect them for faults, over letting me away with my more general, vague point made through fanciful word choice and handwaving.

I do that, yes, I think there's some deep-seated underlying flaw there that's quite hard to grab a hold of. Believing that coding is the same thing as typing source code might be it.

tef posted:

again, you're making the point that you seem to be missing from my posts. the challenge and difficulty from software come from people, not from algorithms, nor data structures.

software starts and ends with people, it only exists for people to use, so tell me again how much of the coding effort is spent on solving trivial problems and how much of it is figuring out what those trivial problems are in the first place?

Max Facetime
Apr 18, 2009

Zombywuf posted:

Requirements gathering is impossible because the customer is always right.

And has probably been sold a solution to the halting problem.

instead of trying to hit a moving target maybe we could become the target itself and bounce about to get the customer to hit us :catdrugs:

Max Facetime
Apr 18, 2009

Zombywuf posted:

So you've written integration software then?

worse, completely new software

Max Facetime
Apr 18, 2009

and the customer is more like a potential customer

Max Facetime
Apr 18, 2009

tef posted:

you'll get equity

there's always equity at the end of the rainbow

Max Facetime
Apr 18, 2009

Cocoa Crispies posted:

and no pinky stretch (known to cause hand disorders in emacs users that mash "ctrl" all the time even when rebound to caps-lock, to the left of "a")

trigger warning

C-y

Max Facetime
Apr 18, 2009

something something auto-completing perl ide

Max Facetime
Apr 18, 2009

git is such trash

can you imagine a GFUI for git? exactly

Max Facetime
Apr 18, 2009

het posted:

I think the idea of local and remote repos isn't intrinsically wrongheaded insofar as it gives you the opportunity to branch without officially branching. I mean maybe you think that's wrongheaded, but I think there are some changes that aren't minimal but for which creating an actual branch is more effort than necessary.

local branches (I hesitate to deem them repos) are fine, as long as they live inside your primary IDE. for example, eclipse has file history that goes back at least 1 month or so.

for the once a year occurrence when one wants to commit just some of the changes, a copy of the source folder followed by reverting the changes one doesn't want to commit right now, then copy-pasting and re-synchronizing the source folder back in is lot less mental than trying to figure out git

Max Facetime
Apr 18, 2009

tef posted:

programming in groovy is terrible and you should all kill yousrealf.ef

Max Facetime
Apr 18, 2009

vapid cutlery posted:

i love ios programming

what do you love about it?

Max Facetime
Apr 18, 2009

Condiv posted:

Has anyone here toyed with concept oriented programming? http://conceptoriented.org/papers/CopInformalIntroduction.html

Seems weird.

it does, and I think it's because it sets about to improve on OOP but its version of OOP is frankly outdated

6. COP vs. OOP posted:

COP is designed to be backward compatible with OOP, i.e., it is reduced to OOP under certain simplifying assumptions. In this section we compare COP with OOP ´by showing where they are different and why COP can be considered a generalization of OOP.

One of the cornerstones of the object-oriented paradigm is inheritance.

"One of the cornerstones". It then goes on to compare COP with inheritance-heavy OOP only, contrasting the IS-A relation from OOP with IS-IN relation in COP

I think in modern OOP the related concepts of encapsulation and information hiding are much more important than inheritance hierarchies. These provide the other object relation in OOP, the HAS-A relation. this part of OOP is not considered in the section at all, and that's a bit curious when you consider that HAS-A relation is the inverse of IS-IN!

From this POV COP looks like an awfully rigid subset of OOP that's constrained to only using one HAS-A relation-based design pattern

Adbot
ADBOT LOVES YOU

Max Facetime
Apr 18, 2009

holy poo poo the comments

I'm actually working on a toolchain for Clojure -> JVM Bytecode -> Decompile Bytecode into Java -> Doppio JavaScript -> CoffeeScript -> Back to JS -> Rhino Compiler to Bytecode -> GCJ for native machine code. This will be very useful for writing native programs in Clojure.

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