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