Songfight App

Links and other hanky panky that doesn't have to do with anything in particular.
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

Looks like there is a Java library I can probably use along with copious instructions on how to get the notifications sent to Apple. But yeah, lots of other stuff would have to happen before that becomes relevant.

http://code.google.com/p/javapns/
User avatar
fluffy
Eruption
Posts: 11087
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Re: Songfight App

Post by fluffy »

(BTW there is some pretty fragile song news on the RSS feed now, which I added last night but wanted to test a bit before I announced it publicly. Right now some things are kind of fiddly and possibly broken but c'est la vie.)
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

Awesome! Thanks fluffy.
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

It looks like there may be another JSON error with sfjukebox.org/fights/dont_forget_to_come_to_my_house_on_wednesday.json - my parse is coming back null.
Attachments
Screen Shot 2011-12-10 at 3.21.21 AM.png
Screen Shot 2011-12-10 at 3.21.21 AM.png (82.8 KiB) Viewed 2257 times
Last edited by Manhattan Glutton on Sat Dec 10, 2011 2:22 am, edited 1 time in total.
User avatar
fluffy
Eruption
Posts: 11087
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Re: Songfight App

Post by fluffy »

jslint says the following:
Problem at line 1 character 385: Expected ':' and instead saw 'http'.

var foo = {"title":"Don't Forget to Come to My House on Wednesday","current":...

Problem at line 1 character 389: Expected an identifier and instead saw ':'.

var foo = {"title":"Don't Forget to Come to My House on Wednesday","current":...

Problem at line 1 character 389: Stopping. (100% scanned).
Looks like the problem is the missing " at the end of coverArtistLink:

Code: Select all

"coverArtistLink:"http://www.homepage.mac.com/bortwein/tv/index.html",
(and this is why I prefer NOT to quote my property names - makes it easier to track things like this down in a syntax highlighting editor)
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

Oops. Fixed.
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Heh, here's a minor, but good one. Merry Christmas, Sam!
{"numFights":"1","fights":[{"key":"better_than_before","title":"Better Than Before","numSongs":12,"winnigArtistNames":[],"numVotes":0,"start":"2011-12-13","end":"2011-12-23","current":true,"smallCoverLink":"http://www.songfight.org/pix/better_tha ... ame":"Mike \"Father Bingo\" Lebovitz","reviewThreadLink":"http://songfight.net/forums/viewtopic.php?f=3&t=8338"}]}

PS: It also looks like the filter screen on sfjukebox.org for fights is broken? /fights is only showing one.
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

Ha. Nice catch there. That typo should be fixed.

I think the reason you're only seeing one fight is because the filter you run gets stored in your session. So if you went to /fights.json?current=true then to /fights you'd see only the current fights. Unfortunately I don't have a menu on the form for current true/false for yet, so you can't actually see that you've got "current=true" in your filter. Oops! If you hit the "Reset Filter" button it should get rid of the invisible filter. Hm, reset doesn't seem to work for some reason...? I'll try to fix that...

At some point I will add a menu for current true/false.
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Nice turn-around time! Looks fixed. How do you recommend incremental loading - just requesting month by month?
If I had a dollar for every one of my songs j$ has called a 90s pastiche, I'd have $1 for every song I've written.

Nur Ein Archives | The New Ugly Podcast
User avatar
fluffy
Eruption
Posts: 11087
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Re: Songfight App

Post by fluffy »

So why are there all these inconsistent spelling/quoting/etc. errors in the JSON files? You aren't generating these by HAND, are you?
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

I'm updating the site right now to have a menu for "current" on the form, and to add reseting of that value when you click "Reset filter".

Incremental loading... hm... well, I do have support for pagination in there. You can use the following request parameters: "perPage" and "page" (starts at 1). Seems like there is something funky going on with that, though. I'm keeping the list of winning artist names in a separate table, since there can be more than one per fight. So I'm joining that table in when querying for fights. That's messing up the "per page" because the per page setting is being applied to the resulting joined rows. Anyway, the end result is that if there is a two-way tie in a fight in your results, you will only get 19 fights back, instead of 20. I'll have to change how I'm doing the queries, I guess. I'll have to get the winning artist names in a second select instead of a join. Oy. I'll let you know when that is fixed. Maybe soon. In the meantime, date ranges should work...

fluffy, I'm using JSPs as templates to generate the JSON. When I first added JSON support a long time that was the easiest way for me to add it and I haven't gone back and changed to use a library like Jackson. One good thing about it is that I can update the JSPs to fix problems without having to reload my webapp, hence the fast turnaround time for fixing the typos. ;)
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Screen Shot 2011-12-25 at 3.03.29 PM.png
Screen Shot 2011-12-25 at 3.03.29 PM.png (89.33 KiB) Viewed 2206 times
Yeah so I guess some things I'm thinking through are:
1. How to make this properly navigable.
2. How to support streaming songs & downloaded songs on a playlist at the same time/playlist management.
3. Where to place the "next fight" banner.

I'm feeling particularly inspired by the Facebook app, since it seems like one of the nicer apps out there, but that leaves a lot of workflow questions. :)

Nerding out for Christmas. Awwwyeah.
If I had a dollar for every one of my songs j$ has called a 90s pastiche, I'd have $1 for every song I've written.

Nur Ein Archives | The New Ugly Podcast
User avatar
fluffy
Eruption
Posts: 11087
Joined: Sat Sep 25, 2004 10:56 am
Instruments: sometimes
Recording Method: Logic Pro X
Submitting as: Sockpuppet
Pronouns: she/they
Location: Seattle-ish
Contact:

Re: Songfight App

Post by fluffy »

Lunkhead wrote:fluffy, I'm using JSPs as templates to generate the JSON. When I first added JSON support a long time that was the easiest way for me to add it and I haven't gone back and changed to use a library like Jackson. One good thing about it is that I can update the JSPs to fix problems without having to reload my webapp, hence the fast turnaround time for fixing the typos. ;)
That doesn't explain why some JSON files work and others don't. :D
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

I'm pretty sure it does explain it, since I hand coded different templates for different entities, and gave myself the opportunity to make different mistakes each time. ;) I also wasn't really being very careful because nobody was using it. MG gets to be QA/beta-tester, and he's doing a good job at it. Thanks MG! :)

This paging thing sucks. Blargh...
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Here's an inconsistency that I can code around, but would be nice...
smallCoverLink is returned from fights.json but smallCover is from fights/title.json

Anywhere where data structures can be similar would be cool. 8-)
If I had a dollar for every one of my songs j$ has called a 90s pastiche, I'd have $1 for every song I've written.

Nur Ein Archives | The New Ugly Podcast
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

I'm updating the site to fix the issues with paging, so you should be able to use "perPage" and "page" request parameters and get the results you expect.

Consistency, yes, good idea. Do you want me to make them both "smallCoverLink" or both "smallCover"? I'm basically custom tailoring this stuff for you at this point. ;)
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

I'm going to go with "smallCover" actually, since its fewer letters/bytes. ;)

The fixed paging code is up. I guess I should check if the artist/song searches have similar issues...

EDIT: In the fights.json output I changed "smallCoverLink" to "smallCover", "largeCoverLink" to "largeCover", and "coverArtistName" to "coverArtist", which should be the same as in {title}.json.
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Thanks Sam! Christmas dinner and celebration has gotten in the way of my development for a few hours at least, but those changes should make my data structures easier. ;)

PS THE PACKERS PLAY AT 7:30 Central!
If I had a dollar for every one of my songs j$ has called a 90s pastiche, I'd have $1 for every song I've written.

Nur Ein Archives | The New Ugly Podcast
User avatar
Ross
Jump
Posts: 2745
Joined: Sun Feb 27, 2005 3:27 pm
Instruments: Guitar, Vox, Bass, Tuned glasses, etc...
Recording Method: Logic on a Macbook.
Submitting as: Ross Durand
Location: Orange CA
Contact:

Re: Songfight App

Post by Ross »

How does a guy with an iPad get a hold of this app?
"I don't like this song, but at least it's good." - veGetar Ianra Ge
http://www.rossdurandmusic.com
User avatar
nyjm
Ice Cream Man
Posts: 1066
Joined: Thu Mar 17, 2005 6:14 am
Instruments: acoustic guitar, electric guitar, synth, various MIDI instruments
Recording Method: Reaper, Line 6 POD, GLS Audio 57 and 58
Submitting as: noah mclaughlin, Ford's Theater Disaster, Juliet's Happy Dagger
Location: atlanta, ga
Contact:

Re: Songfight App

Post by nyjm »

^ Yeah, what Ross said. ^
"You sound like the ghost of David Bowie." - SchlimminyCricket | it was a pleasure to burn | my website | Juliet's Happy Dagger
User avatar
Lunkhead
You're No Good
Posts: 8160
Joined: Sat Sep 25, 2004 12:14 pm
Instruments: many
Recording Method: cubase/mac/tascam4x4
Submitting as: Berkeley Social Scene, Merisan, Tiny Robots
Pronouns: he/him
Location: Berkeley, CA
Contact:

Re: Songfight App

Post by Lunkhead »

Well, not to speak for MG, but it sounds like the app doesn't really exist yet, except on his computer where he's making it. But if/when he gets to a point where he wants people to try it out, there are a few ways. (Correct me if I'm wrong here, iPhone app experts, as I'm just summarizing what I found out from using Google.) He can make the app available somewhere, people can download it, decompress it, drag it into iTunes, and manually sync it to their devices. Or he can figure out how to make it available "over the air" for "ad hoc" testing:

http://www.paradeofrain.com/2010/11/tak ... c-testing/

Or he could just put it in the App Store, and when approved you could just install it from the App Store.
User avatar
Manhattan Glutton
Ice Cream Man
Posts: 1530
Joined: Tue Feb 15, 2005 12:10 pm
Instruments: Angst
Recording Method: REAPER
Location: Madison, WI
Contact:

Re: Songfight App

Post by Manhattan Glutton »

Apple provisioning is a pain in the ass. I'll probably just tweak it a little more to get it usable and put it on the app store. :) As usual, I am stuck in the over-perfecting stage of things, when in reality I should just kick it out the door.
If I had a dollar for every one of my songs j$ has called a 90s pastiche, I'd have $1 for every song I've written.

Nur Ein Archives | The New Ugly Podcast
Post Reply