Open in app

Sign In

Write

Sign In

Alonso Del Arte
Alonso Del Arte

280 Followers

Home

About

Published in

CodeX

·Aug 14

Tests are not documentation

When learning test-driven development (TDD), even from the less dogmatic teachers, you might hear the erroneous dogma that tests are documentation. Any Java project, except maybe Hello World, should have tests. And any Java project, except maybe those meant only for in-house use, should have documentation. If it’s not already…

Java

5 min read

Tests are not documentation
Tests are not documentation
Java

5 min read


Jul 31

What Groovy auto-imports

I had heard of the Spock testing framework before, I knew IntelliJ IDEA (even the Community Edition) has Spock. Or, more precisely, IntelliJ can have Maven download it and add it to the XML file with the dependencies. So I decided to give Spock a try. I made a Hello…

Groovy

3 min read

What Groovy auto-imports
What Groovy auto-imports
Groovy

3 min read


Jul 17

Java trick question: string theory

There’s yet another silly trick question about Java making the rounds on the Internet. Before you answer it, keep in mind that sometimes the shtick of a trick question is getting you to assume something that is not actually stated in the question. Can a Java class extend String? The…

Java

2 min read

Java trick question: string theory
Java trick question: string theory
Java

2 min read


Published in

Dev Genius

·Jul 7

Algorithms practice: The binary strings problem

Here’s a classic problem in the study of algorithms: Given a length n, list all the “binary strings” of length n can be made such that none contains two or more consecutive 1s? For example, given length n = 4, the possibilities are “0000,” “0001,” “0010,” “0100,” “0101,” “1000,” “1001”…

Algorithms

10 min read

Algorithms practice: The binary strings problem
Algorithms practice: The binary strings problem
Algorithms

10 min read


Jul 3

Java lives as long as people write articles saying it’s dead

Java is dead. Article after article tells us that Java is dying. Java is too verbose, too archaic, it’s not evolving fast enough, it’s a terrible first programming language for a student, etc. There are plenty of valid criticisms of Java, as experts like Martin Odersky can tell you. And…

Java

4 min read

Java lives as long as people write articles saying it’s dead
Java lives as long as people write articles saying it’s dead
Java

4 min read


Jul 1

Know how the Java annotations you use work. Part III: Lombok annotations for getters and setters

Annotations in Java can feel like magic, and if we don’t make an effort to understand what they do, we’re little better than cargo cult programmers. In both Part I and Part II of this series, I’ve hinted that I’m going to write an article about Spring’s @Autowired annotation. …

Java

5 min read

Know how the Java annotations you use work. Part III: Lombok annotations for getters and setters
Know how the Java annotations you use work. Part III: Lombok annotations for getters and setters
Java

5 min read


Published in

Dev Genius

·Jun 20

5 silly Java trick questions, with answers

To demonstrate your Java programming acumen, you could create a Java program that does something that’s really useful to you and other people. Or you could answer a bunch of silly trick questions with little relevance to real world projects. This article’s about the latter. Here are five silly Java…

Java

8 min read

5 silly Java trick questions, with answers
5 silly Java trick questions, with answers
Java

8 min read


Jun 10

Quick tip: Random alphanumerics in Scala

Once in a while in my Java projects, I need a function that gives a pseudorandom String of alphanumeric gibberish. For example, “UvYB8qDS2nhn9wu”. So I wrote a Java function for that: public static String alphanumeric(int length) { // TODO…

Java

2 min read

Quick tip: Random alphanumerics in Scala
Quick tip: Random alphanumerics in Scala
Java

2 min read


Published in

Dev Genius

·Jun 7

Rerouting the Java system’s default output stream

File this one under “Not sure when I would ever need to do this, but now I know how to do it.” You can reroute the output of java.lang.System.out to a String, and you can do this a few different ways. Using ByteArrayOutputStream from the java.io package might be the…

Java

4 min read

Rerouting the Java system’s default output stream
Rerouting the Java system’s default output stream
Java

4 min read


May 19

Data structures exercise: Sorted lists in Java with TDD

Many years ago, Richard Hendricks made the big mistake of writing a brute force search for a sorted list. We all make silly mistakes, I’ve made a few just writing this article. I’d consider myself fortunate to have a past silly mistake of mine brought up in a staff meeting…

Data Structures

14 min read

Data structures exercise: Sorted lists in Java with TDD
Data structures exercise: Sorted lists in Java with TDD
Data Structures

14 min read

Alonso Del Arte

Alonso Del Arte

280 Followers

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

Following
  • EP McKnight, MEd

    EP McKnight, MEd

  • Bennett Garner

    Bennett Garner

  • javinpaul

    javinpaul

  • Lokajit Tikayatray

    Lokajit Tikayatray

  • Kesi Parker

    Kesi Parker

See all (269)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams