note to self

Siri, write note

thumbs_up gem is f–king up my heroku upload like a zillion times. I am frustrated with it. But it is a non-critical component so I’m gonna throw it aside for now.

  • Todo: javascript timer display – great to have ~5-10 hrs
  • Todo: record time taken – great to have. ~5-10 hrs. to look at autostart timer plus hidden field.
  • Todo: user authorization. cancan gem. – critical component ~1-2 hrs Largely working
  • Todo: paypal/activemerchant/IPN integration – critical component ~2-5 hrs That took like 12 hrs or something. But at least the base logic is scrambled together for now.
  • Todo: UI. – critical component. ~ infinite hrs. mininum 4 hrs –   maybe 30% done. need logo, T&C, buttons. look at webfonts when have time.
  • Todo: 1-4 option selectors. – critical. ~1-2 hrs works. need to prettify page.
  • Todo: marker. score display – critical. ~2-3 hrs what a surprising pain this was. omg. well i now have calculations in the model. level up. self.praise.
  • Todo: score comparison – critical. ~2-4 hrs – 75% ok
  • Todo: topic feedback – critical. ~2-4 hrs. 20% ok.
  • Todo: better scoring system
  • Todo: purchase logic. you dont know how much more there is to go unless you hit the problem.
  • Add Questions

left: 12 hrs critical.

I have this problem: I can’t concentrate on one feature at a time. I’m reading two guides alternatingly and working on two things alternatingly. It’s kinda boring to get stuck on one thing.

Done today: hacked together some absurdly inefficient links between questions and answers. Do I care? Yes. Am I able to change it? Maybe some other day. In the meantime, there’s always bumping up dynos and workers in Heroku.

*curses at self: you suck at javascript.*
*self: i didn’t sign up for javascript. no one told me about it when i started. nor the css. or rather the HTML5/CSS3/+++*

and also Rails 3.1.1 is very temping but I can’t know how to fix gems that break with 3.1, hence I’ll stick to ole 3.0.9 for now. SIGH. and bump up to jquery myself.

note to self

clones

I wasn’t pleased that Google Analytics wasn’t showing me any data. And that I seemed to have put the Analytics scriptlet in the wrong position of the page. So, because life is so mafan when you switch between Mac and Windows, I had to:

1. Open up my windows version of ruby

2. Download the code files from the hosting service. [= git clone git@heroku.com:appname.git ]

3. I wasn’t sure that it downloaded fully, and I haven’t yet used the file manager with the hosting service on windows, [= never tried to push or pull git repo from heroku on windows. though it shld be similar. but there was one weird error line i wasn’t sure of]

4. so I created a new blank app, and uploaded to a new hosting folder. [= rails new test / cd test / git init / git add -A / git commit -m “init” / heroku create / git push heroku master / heroku rake db:migrate]

5. and that works. ok good. [= site loads fine. nothing broken.]

6. so alright the original live files are downloaded right. open up. go to folder app/views/layout/application.html.erb, open with Notepad++, copy paste one chunk.

7. save it. [= git add -A / git commit -m]

8. and then [= git remote / git remote add heroku git@heroku.com:appname.git / git push heroku master]

9. and whew it’s not broken.

 

alright that wasn’t all smooth. I had to google abit and backtrack some. haiz.

git’s amazing though. so is heroku. so is ruby. so is html. so is javascript. so is everything when it isn’t being broken.

clones

additional image uploads

Hail good news. Upload of more than one image file is now possible. Hurray. The method used was more omg-i-have-to-do-this??? than i imagined. But it’s 3.30am, I don’t care it works after googling for so long. It’s basically working, but I need to clean up the messy links and collateral damage, and switch the old system over… and prettify things. I am so glad this is one major headache solved. what a damn solution.

Looking prettier.

My pivotal tracker pending list is getting shorter. finally.

To add to my todo list: versioning, updated by who, title update link, proper redirection, one main image display small sub image display and damn jquery display again, new commenting system.

I look at what I did near 2 months ago, and what? that was sooo simple. *slaps forehead*

additional image uploads

Today’s progress

Not in order of accomplishment
  • Add ability to login with username
  • Add auto pluralize ability to text (this is darn amazing)
  • straightened out some bits of CSS
  • added pagination (but the CSS is borked)
  • created a new div section. moved stuff into it.
  • added one “I have this”  button, followed an ajax tutorial. good. except that it doesnt auto update the count
  • tried out another different tutorial for ajax button. also works. but also doesn’t auto update the count div.
  • corrected category creation parent category
  • added a count to index page. not like it’s very hard.
Okay that doesn’t sound very impressive, but the javascript ajax stuff is a pain in the ass.
Now I’m gonna try a third ajax method. Thumbs_up!
Today’s progress

confession

I have been doing my Ruby on Rails development with zero tests. Yes zero tests. That is major blasphemy in the modern world of Test Driven Development. Sorry, it’s just too complicated for me.

TDD = writing a test before you code a function or feature. Example test: When button is clicked, form is saved. You run the test, it fails obviously cuz you havent made any button or form. Thereafter you go and code up the button and form and stuff, and run the test again and again until it passes. Write next test.

As you go along, you have a library of tests for each minor and major function of your program. Anything you break something, you will know immediately.

The half bad method is to write the tests after you write the code.

The worstest is me who has no tests cause I’m such a noob.

Next time! I promise.

confession

postgresql

javascript sux, let's do something else
*checks PivotalTracker*
okay let's migrate from sqlite to postgresql
check postgresql install
suspicious
jh$ brew uninstall postgresql (Terminal commands)
jh$ brew doctor
frown
cmd-c cmd-v (ctrl-c ctrl-v) some command
frown
jh$ brew list
frown
jh$ brew install postgresql
...
/some installation cmd
error
frown
restart
jh$ init something
error
restart
frown
jh$ some command
jh$ some command
jh$ some command
jh$ which psql  (hm Lion comes with another psql)
jh$ psql --version
frown
download new pgadmin3
install pgadmin3
modify database.yml
jh$ rails s
localhost:3000
it starts!
frown
add port:5432
jh$ cmd-c
jh$ rails s
error
localhost:3000
jh$ rake db:migrate
it starts!
blank database
:)

~2 hours.

postgresql

sunset

sunset

I can’t decide which is prettier, above or below

@itemhl = HalfLink.find_all_by_item_id(@itemfl, :include => :other_item, :order =>'other_category_id asc') 
@items_grouped_by_categories = @itemhl.group_by {|itemhl| itemhl.other_item.category.name}
sunset