Open Side Menu Go to the Top

08-09-2013 , 02:08 AM
Nevermind, I thought I had an idea but then realized right after I posted it wouldn't work....
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
08-09-2013 , 05:38 AM
dave, i don't understand what the problem is given your description. you said he submits URLs and then things "blow up." what does that mean? what's happening?

are you creating a specific naming scheme/directory structure that he doesn't follow?

how does he "submit a url"?

doing auto image resizing is a good idea, but there's no reason you should have to write a program yourself. this is a well solved problem.

also, the phrase is "granted", not "grant it." :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-09-2013 , 07:53 AM
Two votes for granted.

Isn't each photo for a product with a SKU or equivalent? Couldn't you just use the SKU+color+size+res or some such as the file name/URL?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-09-2013 , 10:22 AM
I wouldn't really try to make a strict schema for products. A nosql solution is actually a good use case here because even similar products (clothes) often have many different schemas of their own.

Also why are there URLs in an excel document and even worse why are there hand coded (?) URLs paired up with image file names (?) in excel?

I'm not sure why URL-> maps need to exist in the first place. Wouldn't you have a web server capable of serving * static files?

IMO it should work like this:

- Photoshop guy places the files in some known folder location
- You use a tool to resize the image and rename them to some standard unique file name, append an md5 hash to the end of the file name so you can easily cache bust updated images
- Move the files to the location of where they will be hosted
- ??
- Profit
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-09-2013 , 09:57 PM
My use case is: I work for a company that sells stuff on Amazon, eBay, Overstock, their own site, etc etc etc, but I'm mostly working on Amazon stuff right now.

Why do I need url's to bulkload items to Amazon? The company's products are on a server somewhere and the only way to get the pictures and other information into Amazon and eBay is to use a spreadsheet.

The catch is that eBay and Amazon have their own definitions of acceptable and they diverge widely, so there needs to be pictures that are valid for eBay, Amazon, and the site. I'm pretty much the first person to really work with Amazon. There was a little bit done before I came in, but that was basically so they could learn enough to train me on how to use it, so when I came in, there was only an eBay and website section. To say the least, it is a disaster area. When I first started, I was using what I could of what they had. Pictures would move around, be renamed, deleted, and on and on. The problem is that, when you upload a bad image url to Amazon, Amazon returns a 100 line error file that is mostly cryptic and partly inaccurate, and it basically throws out the entire load. I'm used to it now, so I can interpret what happened in most cases. I'm also more accurate these days and most of my files have a history of valid uploads, so it is usually pretty easy to isolate the problems. Basically, I got irritated and complained about my uploads going off the rails every time I uploaded to Amazon, so they told me that I was more than welcome to create my own photo area if I thought that would help. I thought it would help, and it has worked out pretty good so far.

The whole point of creating my own picture section was to keep files from being deleted, moved, renamed, and ugh, tamp down on all the duplicate pictures.

So, basically, I have a collection of huge 100 x N excel files to maintain. Most of the work is copy / paste, and I have few macros I use that are effectively copy / paste.

The workflow is basically:

1 - I'm given a bunch of products to create for Amazon, and I create them.
2- The PhotoShop creates the images and makes them Amazon-valid
3- The PS guy loads the images into FileZilla (<rant></rant>)
4- I approve the photos and sometimes I add extra paths via FileZilla.
4- I copy / paste the urls into Excel. Well, not really, the url paths are mostly find / replace, and the images are named near enough that find / replace works 90% of the time.
5- I bulkload to Amazon, and hopefully all goes well.

irt the image resizing program. I should be more clear. I am aware that there are solutions out there, I meant that I would probably modify the program so it is more accurate for the company. I asked him if he would be interested in using an image resizer. Turns out that the person who originally did the photos didn't understand that a 300px x 220px picture on the top-left of a 1500px x 1000px canvas is not a good thing, so the PhotoShop guy is sort of stuck doing things manually. When he can, he does use whatever is built into PS and uses it.

I was just wondering how other companies deal with this stuff. I mean, it would be great to have a flat /img/ directory that could be used, but I don't think it is possible in my case.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 08:52 AM
Well in your free time you should build an "ecommerce" system where you store products, suggested prices, images and whatnot and have a "put on amazon", "put on ebay" type of button.

For products it makes a lot more sense to have base products and "variations" btw. depending on what industry you work in.

Well it all comes back to that open source ERP :P
Imagine you already had a base system that lets you store products and workflow/rights management engine.

[import to create objects in the ERP from an spreadsheet is a very usefull idea btw..that way you can let consultants do stuff in a spreadsheet and just suck it into the ERP or handle all the legacy stuff that is kept in spreadsheets anyways]
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 10:37 AM
Yup, never again straight one page app.

I think after my last job where the site I built had very little javascript and felt slow at times, I sort of went overboard in the opposite direction to build a screamingly fast one page app.

There's just too much duplication for limited gains.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 10:40 AM
I mean, if I build a standard rails app, I can just toss a <%= will_paginate @users %> or whatever and have my pagination up and running.

Angularjs? I have to write my own pagination directive. It's not hard, it's just time consuming relative to reusing someone else's pre built functionality.

I guess I have the code for next time I want to flesh out an app, but it still takes a while.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 11:08 AM
Nc,

Yeah and you can wrap your output in a cache and use turbolinks then you have something that renders a response back to the user in a few milliseconds + their ping time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 01:20 PM
Anyone have suggestions for best blogging solution? I kind of want to start a blog.

I'm thinking just wordpress with some syntax highlighting theme for code, but haven't looked into it much.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 04:35 PM
Quote:
Originally Posted by clowntable
Well in your free time you should build an "ecommerce" system where you store products, suggested prices, images and whatnot and have a "put on amazon", "put on ebay" type of button.

For products it makes a lot more sense to have base products and "variations" btw. depending on what industry you work in.

Well it all comes back to that open source ERP :P
Imagine you already had a base system that lets you store products and workflow/rights management engine.

[import to create objects in the ERP from an spreadsheet is a very usefull idea btw..that way you can let consultants do stuff in a spreadsheet and just suck it into the ERP or handle all the legacy stuff that is kept in spreadsheets anyways]
It'll probably get started next year. Someone with considerable ERP experience expressed interest in the project, but he wants to learn Erlang first...

The company does have a product that "manages" eBay and Amazon. We all pretty much accept that it is not that good. Other programs exist, but they don't have feature x, y, or z, which are critical to the operation of the company, so no matter where they look, there is something missing. FWIW, the program we currently use is written in VBScript, and yeah, its a bit slow.

I'm not sure about the total spreadsheet solution now that I've worked with it more. Take the current situation. It would be much easier if there was a GUI with image upload buttons that the PS guy could use, then the file tree wouldn't matter one iota: the new image would be up, pathed in the db, and the old one would be deleted. I would have to worry about it anymore.

In general, I'm a highly efficient worker. As I said, 90% of the spreadsheet is copy / paste, default values, or left blank. It would be trivial to download Postgres and let it do all the work for me, so I'd only have to focus on creating the 10% that is variable, but I'm already too fast for the company anyways. If I was all full efficiency, I'd be rapping my left fingers on the table while my right hand held up my head all day.

In regards to "variations," yeah, there are a few kinds, called all sorts of things depending on where you work. The part that trips up this system is counting down items that are sold as packages.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 08:16 PM
Quote:
Originally Posted by Nchabazam
Anyone have suggestions for best blogging solution? I kind of want to start a blog.

I'm thinking just wordpress with some syntax highlighting theme for code, but haven't looked into it much.
Just use Github?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-10-2013 , 09:28 PM
Quote:
It'll probably get started next year. Someone with considerable ERP experience expressed interest in the project, but he wants to learn Erlang first...
Start after April and make it Elixir instead of Erlang and we have a deal
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 04:40 PM
Came across something interesting that I never noticed before. These two urls are different:

http://forumserver.twoplustwo.com/191/programming/

http://forumserver.twoplustwo.com/191/programming

The only difference is that "/" is at the end of the url, but they both point to the same page.

Seems like there are a few way of doing this. The first is creating two routing styles, like so:

Code:
GET "/:my-page"
GET "/:my-page/"
or, creating some check, such that:

Code:
if my-string ends in "/": 
     strip "/" 
     GET "/:my-page" 

###or vice versa.
There probably are a few other ways, such as doing redirects, but that seems little odd-ball to me. What is the professional style of doing this?

FWIW, I am building a new site and fixing some old ones, and I've noticed this. I'm trying to consider those that like to use the URL as bread-crumb navigation. Seems like a lot of sites do this, so apparently it is a common thing to consider.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 05:37 PM
Permanent redirect is the standard way to handle that. They are technically separate resources but by redirecting you're telling everyone it's actually the same. That is better than having 2 URLs point to the same place.

.../191/programming/ is short for loading the "index" resource. In APIs it's also common for / ending URLs to be collections but it varies.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 07:05 PM
So, basically, I want to:

Code:
myRoute(url):
    if url is valid: 
           GET "/:url"
    elif regex(url #"/" "") is valid:
           redirect 302: GET "/:url" regex(url #"/" "")
    else: 
            404
????

Seems kind of redundant, but I can see the semantic logic of it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 07:20 PM
I wouldn't do it for every route manually, I'd use some type of middleware or "before filter" to make it happen on every request.

Another option is if you're using nginx or some other server as a proxy you can just write in the redirect rule there.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 07:33 PM
Quote:
Originally Posted by Shoe Lace

Another option is if you're using nginx or some other server as a proxy you can just write in the redirect rule there.
this is how the problem is typically solved, and imo it's the correct solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 08:22 PM
Quote:
Originally Posted by candybar
Anyone working on the ICFP Contest?

http://icfpc2013.cloudapp.net/
Nobody? This may have been the single most amazing programming experience I've ever had. My friend and I aren't going to come close to winning it (probably in the top 100, but outside top 50; this is too far outside our comfort zone) but we went much further (on an absolute basis) than we thought possible at the beginning! Truly recommended!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 08:24 PM
it looks fun, i would have done it if work wasn't so busy now
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 09:05 PM
Any energy I would have spent toward that is going toward the Hunger Games competition (though it would have been funny if I wrote and maintained the unofficial training simulation for a month only to not enter the contest)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 09:16 PM
candybar, i just glanced at the description, but did you solve it using genetic algorithms?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 09:23 PM
Quote:
Originally Posted by gaming_mouse
candybar, i just glanced at the description, but did you solve it using genetic algorithms?
Nope, brute-force searching for the most part. Not sure if the problem is particularly amenable to any other AI technique - I've never seen a problem where precise solutions are required and GA works well. We thought top teams had the problem figured out more analytically to dramatically narrow the solution space, especially after some queries, but we simply ran out of time before we had a chance to implement our speculative theories
.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-11-2013 , 10:07 PM
Quote:
Originally Posted by candybar
Nope, brute-force searching for the most part. Not sure if the problem is particularly amenable to any other AI technique - I've never seen a problem where precise solutions are required and GA works well. We thought top teams had the problem figured out more analytically to dramatically narrow the solution space, especially after some queries, but we simply ran out of time before we had a chance to implement our speculative theories.
I can't think that straight any more, but it would've been nice to be familiar with work in formal verification of programs, theorem proving that kind of stuff and that's what our search algorithm probably comes down to, except it's an an ad-hoc, inefficient implementation. Need to think about this tomorrow!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-12-2013 , 01:28 AM
Could someone write a website that gets aggregate prices for computer components and then applies a percentage discount to let people know how much to ask for when selling their used computers?

That would be just lovely.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m