Sunday, November 8, 2015

The cycle of coding

It looks like I'm coding in cycles of large achievement and then time off. The latest is that I was able to use PHP to load JSON info into my database. It's only afterwards that I was told by the Stack Overflow chat room that I could have done it using AJAX.

The amount of information I have to learn is very daunting. On the flip side my classes feel boring and slow. I wonder how long it would take a school to teach me the things I already know? Three semesters? I have no idea. I'm sure they'd fill in a lot of the holes of simple things I haven't learned yet.

The next step of the project is to connect the database to a user interface. The first steps seem simple enough: a text box for user input and a separate box that gives possible matches the user can select from. The suggestion box will start working on the second letter of the user input after a short period of time (one or two seconds). I'm not sure how many suggestions should appear in the box. I'll probably have to adjust that portion as I go.

I skipped one Javascript class last week and I'm very behind in the E-Commerce class. It doesn't help that I'm bored with the JS class and I absolutely hate the commerce class. I need to get my shit together if I'm going to succeed in either one.

Thursday, October 22, 2015

Phase one

Planning stage of phase one of the web site. There's going to be a lot more going on, but this is what I'm going to start with.

(The picture is small but hopefully readable.)



Wednesday, October 21, 2015

Put in a bit more effort

I just realized that anyone who looks at the web projects on my site might wonder what the point is. The thing is I'm one of those guys who says things like "learning can only be done one step at a time". Yeah, that's me. Every piece of seemingly pointless code I've been writing is just a learning experience. Wow, I can take text typed in a box and put it somewhere else on the screen. I can number things, I can sort things, I can even ignore numbers when I sort. That's what I learned these past two days.

The point is I'm building up to a project that takes advantage of the things computers can do that people cannot. For example, I can't track hundreds of different things in my head and compare them to each other in different combinations. I couldn't write all that out.

What does this have to do with sorting numbered text strings? Like I said before, coding is hard. I've tried to jump into the proverbial deep end and all I got was confused. I've been spoiled by always being able to catch on to just about everything I wanted to do. Javascript is going to take a bit more effort. I can't just read a few pages on a web site and know how to use Ajax with a MySQL database.

I guess that's why people get paid to do these things.

Sunday, October 18, 2015

To analog

I took a break from recreational programming for a week or two and it showed in my last class. I had to do an assignment before class started and I stumbled quite a bit. After an hour or so my brain got it back somewhat.

Why did I take a break? The short answer is programming is hard. Especially for the things I want to do. Even though I haven't been typing up code I have been thinking about my web projects constantly. The stuff I've been thinking about is going to make my site super complicated to build. If I think about it as a whole I also think about giving up on it. I just have to think in small pieces.

Off topic comment: I don't like writing notes down electronically. If I have an idea or if I'm writing down an inspiration, I'd rather use pen and paper. Every time I'm sitting at the computer trying to code and I have a vague idea, I keep looking for the analog way of making scribbles with bad penmanship. Where the hell is that pad of paper?

Wednesday, September 30, 2015

Gonna go for a walk

Learning is coming slowly but I am progressing nonetheless. My newest project is 50 lines total including HTML. Not a lot, but some of the lines took forever to figure out. Simplicity is key to good design anyway. Thankfully I am able to ask questions on the Stack Overflow website.

It would be good to post actual code and walk through my process.

Friday, September 25, 2015

Moping in code

I hope I'm not a "that guy" in class. Yeah, I've read a few books. Who cares.

I feel like the next few classes will be good.

Thursday, September 24, 2015

The next thing

Newest project:

Button: add blank text box
Click text line: change to text box
Escape in text box:
- If nothing stored, remove
- If info stored, remove changes, restore info
Enter in text box: change to text line with info
X button by text box/text line: remove
Text format: number of item, item name
+ and - button by text line: increase/decrease #
Hide + button at 4
Hide - button at 1

User will enter a number and a string. The code will separate the number from the string to manipulate it, then add it back to the string when finished. If the user doesn't enter a number, the number will automatically be 1. Any number over four will be reduced to four.

Monday, September 21, 2015

Example-driven learning

Wouldn't it be great to have a Javascript site that gives examples and explanations for real-world problems? "How do I make a text box that responds this way?" "How do I do such and such?" It would be about simple things that can get a new programmer going.

Saturday, September 12, 2015

First class

My first Javascript class was as exciting as you'd expect the first day of class to be. We went over the syllabus and each student introduced themselves. Pretty boring stuff, but I'm sure it will get interesting soon.

I've tweaked the web site but I haven't added anything new yet. So far tonight I've updated the Text Echo page to reject empty strings and remove white space from the beginning and end of the string. I'll see about taking it to the next step tomorrow.

Thursday, September 3, 2015

Where to go from here

I've put out my first attempt at a web site. At the moment it's very bare, but it's got three links and it works. The problem is when I looked at it on my mobile phone it was very small and didn't fit well on the screen without zooming. Yes, my friends, I've noticed the harsh difference between mobile and desktop web viewing.

The first thing I did was to Google ways to make simple CSS adjustments that would take into consideration the user's screen size, but I couldn't find a simple answer. I need to scale my divs and text size depending on the screen size of the user.

Where do I go from here? Do I have to turn to Javascript "if" statements for CSS values? Do I need to learn a specialized language for this sort of thing?

I've been putting off learning Jquery and such because I wanted to get the basics down first. I figured that once I knew what I was capable of in basic HTML/CSS/Javascript then I could specialize in one or more of the offshoot languages. But maybe that isn't the way I should be going after all.

Wednesday, September 2, 2015

Is "program streaming" the future?

If web pages and internet connections become as fast as the other programs on your computer, will all programs be on the web? Why install something on your hard drive when you can get the same experience in your browser? Security issues are the only problem I can think of at the moment, and I'm not even sure how relevant that concern is. I suppose some developers might balk at having their code be open source, although it seems possible to make the code unreadable to most.

It feels like this is an inevitability. If that's true, then good web developers should be easily employed and handsomely paid. Hopefully that will be me in a few years time.

Tuesday, September 1, 2015

Javascript gaming?

I've never seriously thought about browser gaming. Since it is something that can't currently be done well in the same way as console gaming and yet it seems like an inevitability, shouldn't I consider getting involved as a possible future career?

Sunday, August 30, 2015

Javascript documentation isn't always for me

Like all aspiring Javascript programmers, I spend a lot of time online searching for answers to my newest problems. Unfortunately, quite a lot of pages dedicated to answering questions assume a certain level of knowledge that I have yet to achieve. They use terminology that I will probably learn in school but it's not something the average DIY programmer will automatically be familiar with. Even W3Schools is guilty of this, and they are supposed to be the one place people begin to learn web development.

I've also browsed half a dozen JS books and most have the opposite problem: half the book is dedicated to useless document.write examples that no one will ever use in the real world. How about a book or website for people who are intelligent but don't know developer-speak, people who want to solve real-world problems without needing to wade through worthless examples of newbie JS functionality? I'm a smart guy, show me the appropriate tool for the job and how to use it correctly. That's all I want!

I've been keeping a cheat sheet of what I've learned so far. Who knows, I could eventually turn it into something more, something others might benefit from.

Saturday, August 29, 2015

Boring beginner project notes

Current javascript project:
- Create text box and button
- Text box is the set focus on page load
- User types text into box and either presses enter or clicks the button
- Entered text is displayed in a div on the right side of the screen
- Text box is cleared and is the set focus

Want to:
- Make sure empty strings are ignored
- Validate text by not allowing certain characters, give error message if applicable

Future goals:
- Entered text is added to an array
- Array can be ordered alphabetically
- Duplicate instances of text are only displayed once
- Number of instances of identical text are displayed in parenthesis next to text
- Display a number representing the total number of text lines (including duplicates)
- Display hypergeometric probability percentage in column next to text
- Move text lines from first list to a second list
- Load text from file into array (validate text before loading; exclude large files and inappropriate characters)

Here's the finished project in the "current" form mentioned above:
http://www.whisperingmadness.com/TextEcho.html