Programming Thread

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

previous topic - next topic

0 Members and 3 Guests are viewing this topic.

Go Down

darkknightkryta

I haven't had problems with eclipse.  :p
This on the other hand....
You haven't Blackberry programmed in Eclipse.  I have... shudders...

But yeah I think you just have to get used to the xml programming.  Or getting used to the UI tools and then hooking them into Activities.

the-pi-guy

Obviously there are vocabulary apps on Android.  There are like a ton of them, but the vast majority of them either cost money, or they have in-app purchases.  Some of them aren't very feature filled.  

So, benefits are that I can control what the vocab list is, and I'd be able to expand into some new things.

You haven't Blackberry programmed in Eclipse.  I have... shudders...
But yeah I think you just have to get used to the xml programming.  Or getting used to the UI tools and then hooking them into Activities.
Yeah, I wouldn't want to use Eclipse for this.  

I'm having issues with this.  It comes with a fair amount of auto generated code, but there were two lines of which that the compiler can't match up anything to.  I tried removing the lines, and I tried doing some other things with those lines.  But I'm not sure if I'm missing something on the xml side or if I'm missing something on the java android side of things.  

darkknightkryta

Obviously there are vocabulary apps on Android.  There are like a ton of them, but the vast majority of them either cost money, or they have in-app purchases.  Some of them aren't very feature filled.  

So, benefits are that I can control what the vocab list is, and I'd be able to expand into some new things.
Yeah, I wouldn't want to use Eclipse for this.  

I'm having issues with this.  It comes with a fair amount of auto generated code, but there were two lines of which that the compiler can't match up anything to.  I tried removing the lines, and I tried doing some other things with those lines.  But I'm not sure if I'm missing something on the xml side or if I'm missing something on the java android side of things.  
XML.  You have to make sure you rmanifest file is right.  Plus you have to add all your activities to your manifest, or something.  It's been a while so I don't quite remember.

the-pi-guy

It's not very fun when I don't know where an error is.  
Android Studio isn't reporting any error right now, but my app keeps crashing.  :P

the-pi-guy



  Log | Android Developers



lol, there's a log.wtf for logging messages.  

Legend

It's not very fun when I don't know where an error is.  
Android Studio isn't reporting any error right now, but my app keeps crashing.  :P
I'm practically all self taught so welcome to my world! I would never know where an error is or what the error even is.

I'd use a freakton of print statements to breakup the code so I can track down which section the error occurred. If it's a problem where the program just crashes or can't run, I'd comment out all the newish code and slowly add it back until it breaks again. Also involved a lot of just general trial and error.

Wasn't until fairly later that I actually started learning about the "correct" way to fix bugs.

the-pi-guy

I'm practically all self taught so welcome to my world! I would never know where an error is or what the error even is.

I'd use a freakton of print statements to breakup the code so I can track down which section the error occurred. If it's a problem where the program just crashes or can't run, I'd comment out all the newish code and slowly add it back until it breaks again. Also involved a lot of just general trial and error.

Wasn't until fairly later that I actually started learning about the "correct" way to fix bugs.
Eclipse would show where the error occurred.  
It'll say what line and give a general reason why it broke.  Then I'd pack that area with prints to see what the trouble variable was doing, unless the problem was obvious.  

Android Studio doesn't seem to do the same thing.  Even though it uses Java System.out.print doesn't work.  Had to look up how to do it.  I still wasn't sure it was working. The thing it prints out to is filled with stuff, and nothing sticks out.  

The problem is, it'd compile and everything.  But if I tried running a certain activity, it'd break.  I had no idea where.  I tried the debug thing and it at one point didn't even seem to be teaching my code.  :P

the-pi-guy

Everything seems to be working.  
Now to see if I can break it.  

the-pi-guy

"How to read from a file"
Make sure it's in the asset folder. 
"It works! "

"how to write to the file"
You can't write to the asset folder during runtime. 
:o >:(

Now I have to redo the reading.  :P

the-pi-guy

My app is "finished".
Everything seems to be functional.  I have  around 500 vocab words on there.  A matching game works, and the translation game works.  

My complaints are:. The text is hard to read.  It's dim. Theres also some weird view issues.  When the app starts up, it starts in a full screen that is blank.  Touching the screen causes the full screen to go away, and the buttons to appear.  Not exactly sure what the issue is.  

Also in the matching game, the buttons change size with different words, which is fine.  But the buttons are aligned with the one below it.  The alignment means that longer words will push both boxes into the ones on the left.  
Problems aren't so bothersome that I will fix them, I don't think.  

On another note.  
I really enjoy discovering tricks.  
I did this a lot when programming my calculator.  
For example, there wasn't a way to append a number to a string.  The way to get around this was to basically turn the number into a function and then transfer that function to a string, then you could append it.  

Also graphics tricks were fun.  They were pretty obvious, but the results were pretty cool. So I was making a menu.  And originally, I had it set up to output every time the cursor moved.  Which is ludicrous.
Instead I just erased where the cursor was, and Drew it in the new place.  Ran faster, and looked better (because it wasn't flashing while drawing).

Legend

For example, there wasn't a way to append a number to a string.  The way to get around this was to basically turn the number into a function and then transfer that function to a string, then you could append it.  
Strings suck. The standard ones in C# are so inefficient to change or modify. Appending a letter to the end of a string actually generates a new string and tosses the old one.

What do you mean you turned the number into a function?

the-pi-guy

What do you mean you turned the number into a function?
The TI-83 is basically all preset variables.  A,B,C,etc for numbers.  
Str0, Str1, Str2, all the way to Str9

They also have y1, y2, etc are the functions that the calculator graphs.  The only variables that can be made are lists.  

But something like "A"+6 doesn't work.  It gives a data type error.  

You have to convert the 6 to a string using this code.  (Where N=6)

 {0,1→L₁
:{0,N→L₂
:LinReg(ax+b) Y₁
:Equ►String(Y₁,Str1
:sub(Str1,1,length(Str1)-3→Str1

Basically it makes 2 lists one for the domain and one for the range of the function.  
From these two lists, the next line makes the function
Y1=Nx+0
It then transfers from the function y1 to the string str1.
At which point substring cuts off the "x+0".  

How's that for inefficient!

Legend


the-pi-guy

This next semester, I have Operating Systems, Software Engineering I and Computer Organization.  

SE I is all about practices.  How to design stuff, how to test stuff, how to communicate with a client.  This one has a major project.  
"This course will provide an in-depth study and analysis of at least one large scale software
system. Students will analyze, design, and partially implement an extensive software
project. Case studies will address major system concerns such as specification,
classification, inter-relationships, validation, and evaluation. Other topics include the use of
UML, prototyping, data flow diagrams, etc."


Computer Organization "This course focuses on the design of microprocessors, especially
the Arithmetic and Logic Unit and the Control Unit, as well as the memory hierarchy, especially registers,
DRAM-based main memory and caches"

Operating Systems. "
An introduction to operating systems concepts. Topics covered include: interrupts,
memory allocation, virtual memory techniques, process scheduling and synchronization,
deadlocks, resource allocation, and file systems. A major programming project will be
assigned to provide experience with operating system design."

From what I hear is, Computer Organization is probably the hardest class in the major.  

the-pi-guy

My app is "finished".
Everything seems to be functional.  I have  around 500 vocab words on there.  A matching game works, and the translation game works.  

My complaints are:. The text is hard to read.  It's dim. Theres also some weird view issues.  When the app starts up, it starts in a full screen that is blank.  Touching the screen causes the full screen to go away, and the buttons to appear.  Not exactly sure what the issue is.  

Also in the matching game, the buttons change size with different words, which is fine.  But the buttons are aligned with the one below it.  The alignment means that longer words will push both boxes into the ones on the left.  
Problems aren't so bothersome that I will fix them, I don't think.  
Tomorrow my plan is to update my app.  
Already fixed the matching button issue.  Probably won't fix the previous one.

The biggest thing will be the vocab will be greatly expanded.  I finally found an awesome vocab list that has something like 1400-1500 words in it.  Just have to build something to go through the excel file I guess...  
Would be nice if there was already a program built that could make it easy...

Go Up