Giter VIP home page Giter VIP logo

emilybache / racing-car-katas Goto Github PK

View Code? Open in Web Editor NEW
293.0 23.0 348.0 5.14 MB

Several code katas on a racing car theme

Home Page: https://youtu.be/ldthYMeXSoI

License: MIT License

C# 8.84% C++ 8.83% Java 10.51% JavaScript 4.65% Python 5.98% Ruby 4.70% Scala 4.40% CMake 6.43% Swift 8.83% Shell 0.20% Kotlin 8.09% Meson 2.85% PHP 9.85% Batchfile 0.04% Go 1.95% TypeScript 4.40% C 0.41% Makefile 0.70% Rust 8.34%

racing-car-katas's Issues

ruby code and require

Hi,

how do you expect the ruby test to be run?
I tried them but I had tho fix some require to require_relative in order to let them pass.

Am I doing something wrong?
Do you want a PR?

TirePressureMonitoringSystem: case to reset the alarm.

Hello,

I did the Kata Car TirePressureMonitoringSystem in "java" version.

I think the case to reset the alarm is missing when you call 2 times the check function:

Alarm alarm = new Alarm()
alarm.check();
=> alarm is set to true
alarm.check();
=> Here the alarm is always on event if the sensor return false.

public void check()
    {
        double psiPressureValue = sensor.popNextPressurePsiValue();

        if (psiPressureValue < LowPressureThreshold || HighPressureThreshold < psiPressureValue)
        {
            alarmOn = true;
        }
    }

So, the code could be:

public void check()
    {
        double psiPressureValue = sensor.popNextPressurePsiValue();

        alarmOn = (psiPressureValue < LowPressureThreshold || HighPressureThreshold < psiPressureValue);
    }

Thank you.
Jérôme.

Different class name in Java project

Hi,
in the Java project "UnicodeFileToHtmlTextConverter" the class that should be tested it has been renamed to "HtmlTextConverter", maybe it's better to name it back to "UnicodeFileToHtmlTextConverter" to be coincise with the documentation.

Incorrect comparation operator

Comparing the two string like showed in the snippet of code below it's not a good way, unless you're comparing the instance of the string, but I don't think this is the case since String class is immutable.

public void send(String message)
{
    // ...
    if (message == DIAGNOSTIC_MESSAGE)
    // ...
}

It should be:

public void send(String message)
{
    // ...
    if (message.equals(DIAGNOSTIC_MESSAGE))
    // ...
}

The target class is TelemetryClient of project TelemetrySystem (Java version), line 44

Update code

Hi Emily, I updated the Python porting of the exercises you provided.

If you like, take a look and let me know your feedback.

Soon will present this coding dojo at a conference, after that I will make available the slides for the exercises.

Luca

Pressure Monitoring Systems errors in golang version

Hi everyone,

In the Go version of the pressure monitoring systems exist an error in the 25 line of the sensor.go file because pressureTelemetryValue always will be the same value and is because s (in line 23) takes the same seed all the time, then, the value that assume is the same all the time.

In another hand, this kata doesn't is useful like a mocks exercise and is because to test the check function of the alarm, all that is needed is to create an instant of the alarm with different threshold, in the same way, is possible to create an instance of the sensor using anonymous functions to change the offset and samplePressure values, in that way is not needed to make a mock of anything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.