Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

0 Members and 3 Guests are viewing this topic.

the-pi-guy

Quote from: Legend on Jun 14, 2017, 02:46 PMHow does programing work in other languages?

Is it common practice to just do everything in English like it's designed, or is the local language sprinkled in when possible?

Lol, thats actually what that post comes from.
programming languages - Do people in non-English-speaking countries code in English? - Software Engineering Stack Exchange

Basically they use English or some combination of English and their native language.  

I do know there are some programming languages in other languages but they are not always very popular.  

the-pi-guy

#91
Trying Android Studio, but it's not really cooperating with me. 
Took an hour to start up certain aspects of it.  It had to redownload some things, but it was still troublesome. 

Also I think this is just such a weird setup. 

the-pi-guy

So I'm going to make a vocabulary game on my android.  Probably going to make a couple.  
All to learn japanese vocab.  

Starting out with some matching.  I have been putting some thoughts together about a few other apps, that I might finally decide to put together.  

I have an idea of using what I know of Japanese to make a text based RPG kind of game, but we will see about that.  

Also thinking I will make some conjugation practicers.  

the-pi-guy

Was trying to take this page:
List of jōyō kanji - Wikipedia
Take all the Kanji and their meanings and map them up to a database.  Was having a lot of trouble.  There were a few entries that would break.  Like that one with 3 kanji in the box.  
I spent  a few hours and a few hundred lines of code trying to get it to work.  
Anyways it turned out to be much easier, just to use excel and take out all the stuff pretty easily.  

Matching each kanji and counting the unicode from this page was much easier.
Unicode Kanji Code Table

But one of the characters still seems to be breaking..

Legend

ARe you parsing the raw html? Fetching it with an xml parser might help. That's how our bot system searches websites for content.

the-pi-guy

Quote from: Legend on Jun 21, 2017, 02:12 PMARe you parsing the raw html? Fetching it with an xml parser might help. That's how our bot system searches websites for content.
Wouldn't really fix the issues I'm working with.  
Now, I'm getting some kind of weird error.  The output shows that a character is the first one, and I removed all the spaces.  Yet the character isn't grabbed unless I grab the second character...

Legend

Quote from: the-Pi-guy on Jun 21, 2017, 03:28 PMWouldn't really fix the issues I'm working with.  
Now, I'm getting some kind of weird error.  The output shows that a character is the first one, and I removed all the spaces.  Yet the character isn't grabbed unless I grab the second character...
I love those errors. Can you force your system to tell you the value of the first character for debugging?

the-pi-guy

Quote from: Legend on Jun 21, 2017, 03:40 PMI love those errors. Can you force your system to tell you the value of the first character for debugging?
Yep, I figured it out.
Why is  appearing in my HTML? - Stack Overflow
'ZERO WIDTH NO-BREAK SPACE'
And it has been fixed!

the-pi-guy

That was probably the worst project I've ever done.  Really should have been a few hour project at worst, but quickly became a day and a half thing.  Wasn't working on it the whole time, but eh.  
I had a bunch of difficulties.  

The one part of the project was to grab each listing from Wikipedia.  This was hard because the table wasn't consistent. Some boxes were empty, other boxes had three things in them, each on it's own line.  Plus the first two boxes were usually identical.
Ultimately I did this manually.  Got rid of all those boxes as they were all in the same line.  Excel and the formatting Wikipedia used ultimately made this a few minute process at most.  

Second difficulty was using that site to match up the kanji to a Unicode.  So I used a counter to start with 0 and go all the way up to f using the first part of the string as the number.  
This was actually pretty easy.  Just had to be careful of spaces and double spaces while counting.  The solution is of course to get rid of all the spaces.  

Third difficulty - deleting lots of my code thinking I would never use it anymore.  Then finding that there was a one off error in the character database.  But this time I made it much more optimized.  Originally it just continually combed the kanji Unicode website, refetching it every time I wanted to match a character.  
Now it just keeps it on for usage.  


Voila a few minutes later. And I have a database of 2300 characters.  
And me wondering at what point would it have been more efficient to just have done it manually, with the starter code I had.  
The starter code asked me for each character, and then fetched the kanji Unicode as before.  



This xkcd comic is painfully true sometimes.  

Legend

Yup it's just so fun to over engineer things. I do that every week  :P


Biggest problem I have is accepting that rapid iteration is so much faster than doing something perfect the first time. I've gotten better in the last year at least.

the-pi-guy

Has anyone made an Android app?

Legend

Quote from: the-Pi-guy on Jun 22, 2017, 06:19 PMHas anyone made an Android app?
No.

Are you making your vocab learner into one?

the-pi-guy

Quote from: Legend on Jun 22, 2017, 06:35 PMNo.
Are you making your vocab learner into one?
That's my plan.  
It's different than what I'm used to.

darkknightkryta

Quote from: the-Pi-guy on Jun 20, 2017, 02:28 PMTrying Android Studio, but it's not really cooperating with me.  
Took an hour to start up certain aspects of it.  It had to redownload some things, but it was still troublesome.  

Also I think this is just such a weird setup.  
Yeah... Still better than Eclipse

the-pi-guy

Quote from: darkknightkryta on Jun 22, 2017, 08:22 PMYeah... Still better than Eclipse
I haven't had problems with eclipse.  :p
This on the other hand....