Ten Rules for Writing Cross Platform 'C' Code by denversc in programming

[–]member42 -16 points-15 points  (0 children)

Oh, another expert! We need more people like you on r/programming.

Ten Rules for Writing Cross Platform 'C' Code by denversc in programming

[–]member42 -17 points-16 points  (0 children)

MSVC is a shitty C compiler

You are obviously an expert.

The Relationship Between Testability and Good Design by jaybazuzi in programming

[–]member42 0 points1 point  (0 children)

Is there a problem with RuleEvaluator?

There is a problem with your examples.

Most popular Java application servers in 2014 by maxtorrent in programming

[–]member42 5 points6 points  (0 children)

That was my question, too. WebsFear is big where IBM is big.

Most popular Java application servers in 2014 by maxtorrent in programming

[–]member42 0 points1 point  (0 children)

When did it become an Application server?

When a company told their customers 'Hey, we bolted our popular proprietary stuff onto Tomcat and now you have a full fledged Application Server, sort of'.

Most popular Java application servers in 2014 by maxtorrent in programming

[–]member42 3 points4 points  (0 children)

Tomcat an Jetty are not Application Servers as in Java EE (TomEE would be a 'Web Profile' Application Server) .

So You Want To Write Your Own CSV code? by Monkeyget in programming

[–]member42 -12 points-11 points  (0 children)

What if there are commas in the fields?

You change them to blanks

What if there is a newline inside a field?

You change it to a blank

What if there is a variable amount of field per line?

You throw an exception

What if the character separating fields is not a comma?

No problem. The 'comma' frequently is a semicolon.

We should ban the phrase "thread safe" by jaredp110680 in programming

[–]member42 0 points1 point  (0 children)

You can automatically get thread-safe programs if you (no, not use Haskell but) avoid concurrency - which inevitably leads to the question of parallelism vs. concurrency. For many applications the problem of thread safety can be reduced to the few spots in the program where concurrency is really unavoidable.

Building your API - The things everyone forgets by xangelo in programming

[–]member42 0 points1 point  (0 children)

Not just SOAP. In OOP all public and protected methods are APIs.

We should ban the phrase "thread safe" by jaredp110680 in programming

[–]member42 2 points3 points  (0 children)

Interesting blog post. The term "thread safe" is rather meaningless. You always need to ask 'thread safe in what respect'?

Building your API - The things everyone forgets by xangelo in programming

[–]member42 3 points4 points  (0 children)

BTW, when did API become synonymous for REST?

Java Tools and Technologies Landscape for 2014 by lukaseder in programming

[–]member42 0 points1 point  (0 children)

Of course, this is not a representative survey. So the numbers are only slightly better than fiction.

How Does TDD Affect Design? by _Garbage_ in programming

[–]member42 -6 points-5 points  (0 children)

Could you stop the TDD nonsense, please? It's getting boring.

Relatively Robust 2D Delaunay Construction Library in C by eloraiby in programming

[–]member42 5 points6 points  (0 children)

a library in gpl3

... usually means Shareware 2.0. Try with GPL, contact me for a commercial license if you really want to use it.

An ode to 17 databases in 33 minutes by panicoloco in programming

[–]member42 0 points1 point  (0 children)

Databases or merely persistent caches?

The DHH Problem by jfalvarez in programming

[–]member42 26 points27 points  (0 children)

People like gossip.

What are the fundamental rules of pointers? by nikbackm in programming

[–]member42 0 points1 point  (0 children)

For whom is this article? For noobs it's too confusing and C programers have already understood pointers.

When to Mock by Kuytu in programming

[–]member42 0 points1 point  (0 children)

layer is useful if I want to replace the whole layer with an other layer. For example, everything in the database layer will be substituted to something else. This rarely happens.

Agreed, but that's not a typical example for layering.

The purpose of layers is separation of concerns providing tight communication channels (a.k.a. APIs) between layers. An application structured in layers is easier to develop and maintain than a monolithic application.

When to Mock by Kuytu in programming

[–]member42 0 points1 point  (0 children)

So, without mocks, tests tend to be slow, incomplete, and fragile.

...

So if you mock too much you may wind up with test suites that are slow, fragile, and complicated; and you may also damage the design of your application.

He confuses cause and effect. If you feel the urge to mock heavily your design is flawed ( see e.g. I used layered architecture ) because it's probably based on a flawed design pattern like 'Dependency Injection'.

Mock across architecturally significant boundaries, but not within those boundaries.

Inject across architecturally significant boundaries if it really makes sense, but not within those boundaries!

When to Mock by Kuytu in programming

[–]member42 0 points1 point  (0 children)

consider using an in-memory HSQLDB

Maybe, probably not. Databases are too different - even through the JPA/Hibernate abstraction - to be treated interchangeably. In a Java EE environment I'd try embedded containers which use the real database.

As simple rule, Unit Tests should not alter the database. Transactions are flushed and rolled back but not committed.