Giter Site home page Giter Site logo

Update code about racing-car-katas HOT 5 CLOSED

lucaminudel avatar lucaminudel commented on June 26, 2024
Update code

from racing-car-katas.

Comments (5)

emilybache avatar emilybache commented on June 26, 2024

Hi Luca,
Cool that you're doing a coding dojo at a conference!
Was there supposed to be some code attached to this comment? I'm not sure what updates you've made?
Emily

from racing-car-katas.

lucaminudel avatar lucaminudel commented on June 26, 2024

Here are the latest changes I made to the Python code: https://github.com/lucaminudel/TDDwithMockObjectsAndDesignPrinciples/tree/master/TDDMicroExercises/python

If you are interested I made minor updates also to the code of the exercises in the orher languages.

from racing-car-katas.

emilybache avatar emilybache commented on June 26, 2024

Thanks Luca! I've incorporated some of your updates into my python version. I couldn't see many changes in the Java version which is the other one I tend to use. Did you notice I added a C++ version of a couple of the exercises?

btw I didn't like your use of a double underscore in tire pressure monitoring (__OFFSET), I think one underscore is enough. I believe double underscore is generally reserved for language features.

from racing-car-katas.

lucaminudel avatar lucaminudel commented on June 26, 2024

Useful feedback, much appreciated

btw I didn't like your use of a double underscore in tire pressure monitoring (__OFFSET),

I was aiming to set the visibility of the constant to private. I saw this http://docs.python.org/release/1.5.1p1/tut/private.html . Looks like that's not the right way. Is single underscore the way to go then?

In the UnicodeFileToHtmTextConverter exercise I noticed you import the html module that does not work on my mac, I used the cgi module instead. Any comment/suggestion on this?

I couldn't see many changes in the Java

The main change is in the TelemetryClient class (the one that simulate the connection and the communication with a telemetry server) from the TelemetrySystem exercise. I simplified the send() and receive() methods, now the code is easier to read and understand. Now this Java code is in sync with the C# and all the others.

A friend of mine is working to the porting of the proposed solution in Java, soon I should merge that in the repo.

Did you notice I added a C++ version of a couple of the exercises?

Yep, I'm happy to add that code to the repo. Do you want to send a pool request or do you want me to copy it?

from racing-car-katas.

emilybache avatar emilybache commented on June 26, 2024

The documentation you refer to is an absolutely ancient version of Python I'm afraid! By convention a single underscore indicates private, even though it technically isn't, double underscore adds some name-mangling but actually no more privacy. It just adds complexity.

The html module is for Python 3, cgi is for Python 2 - they are not compatible with each other. I've just pushed a version with comments explaining that.

I think our repos are so far out of sync that it's probably easier for you to just copy the C++ files actually!

Regards,
Emily

from racing-car-katas.

Related Issues (11)

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.