Coder Social home page Coder Social logo

gif's Introduction

Hello there! Welcome to my profile! 🖖😄

  • 👨‍🎓 I'm a former Philosophy professor who is extremely curious about technology and so decided to work in the field
  • 🌱 I’m currently learning Swift and UX/UI Design at the Apple Developer Academy in Fortaleza (class of 2023)
  • 😄 Pronouns: He/Him
  • 🌍 I speak Portuguese, English, French, German and a little bit of Japanese
  • 👨‍💻 Random fact about me: I first got interested in programming in 2017, when I finished my PhD in Philosophy (PUC-Rio, specializing in Philosophy of Language and Thought) and started studying Computational Linguistics.

pedrohgmuniz-figma pedrohgmuniz-illus pedrohgmuniz-ps pedrohgmuniz-swift

gif's People

Contributors

pedrohgmuniz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gif's Issues

AMEI

amei sua ideia para o aprendizado de alemão. Sugiro implementar um dicionário para quem não é tão profundo no alemão.

Sugestão

Seu código está muito massa, mas está muito longo. Inclusive, foi o que comentaram no meu, por isso estou repassando.

print(
"""
The hunter goes to grandmother's house. He wants to check on the grandmother.
Now the hunter is standing in front of grandmother's bed. But it's not the grandmother who's in bed, it's the wolf.
The hunter is happy because he has been looking for the wolf for a long time. He wants to shoot the wolf. But he thinks, 'Maybe the wolf ate the grandmother. And maybe I can still save the grandmother.'
The hunter takes a pair of scissors and cuts open the wolf's belly. But the wolf doesn't notice - he's fast asleep.
The hunter cuts open the wolf's belly. Suddenly Little Red Riding Hood comes out of the wolf's belly. And then the grandmother comes out of the wolf's belly. You are both still alive.
Then Little Red Riding Hood gets big stones. And the hunter puts the stones in the wolf's belly.
The hunter sews up the wolf's belly.
The wolf wakes up and sees the hunter. The wolf gets very scared and wants to run away. But the stones in the wolf's stomach are very heavy. The wolf falls over and lies dead.
The hunter takes the wolf's skin home with him. And Little Red Riding Hood and Grandmother eat cake.
That was the fairy tale of Little Red Riding Hood.
🧙‍♀️🧚‍♀️🧝‍♀️🧞‍♂️🦄🧜‍♂️
Do you want to go back to the main menu? - Press 1 and Enter
Do you want to leave the game? - Press 2 and Enter
"""
)

Você pode fazer várias funções em outro diretório apenas para esses prints, teu código teria menos da metade, mais limpo e não iria precisar de tanta memória para rodar.

Loop infinito

while loop0 {

Quando coloca-se uma entrada que não está entre as entradas válidas, o sistema fica realizando print("Du musst '1', '2' oder '3' typpen (You must type '1', '2' or '3'") infinitamente.
Para desfazer esse loop infinito, você poderia colocar a leitura de "input1" dentro do while.

Sugestão de melhoria

Oie Pedro, tudo bem? ✨

Queria dizer primeiramente que AMEI a sua aplicação. A ideia é muito incrível e criativa. Eu nunca tinha experimentado esse tipo de interação com um programa de computador. Com ela o aprendizado é bem mais fluido e divertido 👾

Como sugestão eu diria apenas para, em vez de escrever a resposta, o usuário selecionar respostas predefinidas, como se fosse uma questão de múltipla escolha. Sugiro isso pois as vezes o usuário pode não saber como escreve uma palavra, ou não entender o que deveria ser escrito, por ser iniciante no idioma ☺️

Estou disponível caso você queira ajuda para fazer essa implementação e também para adicionar mais histórias fantásticas ao seu programa 🦄🧚🏻‍♀️

GIF comment 🎉

Pedro, eu amei muito a sua proposta, principalmente o fato de ajudar a desenvolver o Inglês ou o Alemão 😍 Gostaria de saber o que significa lowercased(), que tem tanto na StoryLineEN como na StoryLineDE. Segue abaixo um exemplo:

    let answer1 = readLine()?.lowercased()

recebimento da variável do switch case

Oie Pedro, adorei seu código! Minha sugestão é que você diminua as possibilidades o recebimento da variável do switch case de acordo com as opções do menu.

let input1 = readLine()

Aqui está um exemplo que como você pode fazer minha sugestão:

var teste = readLine()
        while true {
            if (Int(teste!) == nil) || (Int(teste!)! >= 5) || (Int(teste!)! <= 0) {
                print ("Valor invalido, digite de 1 a 5 pra acessar o valor de opcão: \n")
                teste = readLine()
            }else{
                break
            }
´´´´

Sugestões de nomenclaturas

Nomear uma função com a ação que ela vai realizar pode facilitar e induzir um melhor entendimento do código.
Digamos que uma função realiza a leitura de uma entrada, se o desenvolvedor nomeia ela como "readInput", ao se deparar com a chamada daquela função, outra pessoa já entenderá que ela irá realizar a leitura de alguma entrada, mesmo sem ter realmente aberto a função e analisado ela. Isso pode facilitar a leitura do código e torná-la mais indutiva.
Exemplo:
Sua função "part1()", se ela fosse nomeada como "startGameInGerman()", facilitaria a leitura das parte onde a função é chamada e também facilitaria a leitura e entendimento da própria função, pois já se saberia o que esperar dela.
Você pode ler mais sobre esse assunto no livro "Código Limpo" que dá várias dicas legais sobre o assunto, mas se quiser dar uma olhada rápida, pode dar uma olhada nesse link: http://tech.azi.com.br/clean-code-parte-1-nomes-significativos/

Ótima ideia

Eu amei a ideia da sua aplicação e com certeza vou utilizar nos meus estudos de inglês. Parabéns!

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.