1. Post #2841
    CoderHire
    _Undefined's Avatar
    November 2007
    1,466 Posts
    Magento is configuration over convention and it's pretty annoying.

    Edited:

    If I want to make a new module with one helper that I use to, for exmaple, generate image urls in a view. I need to make at the very least, three folders, two xml files (which do nothing but tell magento that the helper exists), and a php file.
    We've just moved away from Magento to use Exp:resso store in ExpressionEngine. It may not be as configurable, but ExpressionEngine gives you so much freedom, we haven't missed Magento even a little.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  2. Post #2842
    We're doing enough things different from the stock magento install that I've been tempted to rewrite everything in Ruby/Rails in my spare time. We do customizable stationery (wedding invitations and stuff like that, you go on and type your name in and add your photos and what have you and then it gets sent off to our printer and shipped to you) and there's ton little things that we want slightly different from the way magento does them out of the box.

    It'd definitely be an undertaking to match magento feature for feature, but all these small changes would be so much easier down the line. AND I'd have unit/integration tests, because the indian firm that put this together before it got handed off to me didn't do that at all :(
    Reply With Quote Edit / Delete Mac United States Show Events

  3. Post #2843
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    From what you described, Magento wouldn't be fitting at all.

    Magento does (almost) everything I need. Magento does its job because I use it for what Magento is supposed to be used for.

    If only it would allow me to completely customize the invoices, because they don't look too good and it's not very smart for me right now to buy an expensive module.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  4. Post #2844
    Believe me, I know it's definitely shoehorned in a bit. I was around when the project got started so I didn't get a chance to weigh in on it :/

    It works though. All the image customization is done outside the store with Adobe Scene7 so thankfully that part wasn't shoved in to magento. We just use custom fields on configurable products to hold the data for the customization options and build the URLs that Scene7 needs and the XML info for the printer from that.
    Reply With Quote Edit / Delete Mac United States Show Events

  5. Post #2845
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    Also I've got to say I completely fell in love with Ruby.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Friendly Friendly x 1 (list)

  6. Post #2846
    :) always glad to hear that.
    Reply With Quote Edit / Delete Mac United States Show Events

  7. Post #2847
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    I'm having some problems though, and I'm not allowed to ask for help from the big boss Mr. Tera, but I need to generate a random 32 bit integer.

    [1000000000..9999999999].sample completely freezes my poor ol' Ubuntu.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  8. Post #2848
    Use Random.rand()
    Reply With Quote Edit / Delete Mac United States Show Events Friendly Friendly x 1 (list)

  9. Post #2849
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    Now why is that suddenly extremely fast, and it can generate a number over the max size of a integer.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  10. Post #2850
    Because doing [1000000000..9999999999].sample is creating a really big array and then selecting a random object from that array which isn't a particularly fast operation.
    Reply With Quote Edit / Delete Mac United States Show Events Agree Agree x 2 (list)

  11. Post #2851
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    Well yeah, but what does Random.rand() do.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  12. Post #2852
    I'm not sure what ruby does under the hood for that since I've never needed to dig in to it to find out before.
    Reply With Quote Edit / Delete Mac United States Show Events

  13. Post #2853
    Gold Member
    Asgard's Avatar
    July 2010
    3,605 Posts
    Oh, okay
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  14. Post #2854
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    Also I've got to say I completely fell in love with Ruby.
    Me as well, I have to dive a bit deeper though into it than what I am doing right now. ( Using rails )
    Reply With Quote Edit / Delete Windows 7 France Show Events

  15. Post #2855
    MyBigBoner.com
    fritzel's Avatar
    March 2009
    4,547 Posts
    horizontal padding is your friend. I'd also lighten the alternating rows and get rid of the vertical lines through the darkened rows.
    Here is the updated one.


    I'm not sure what ruby does under the hood for that since I've never needed to dig in to it to find out before.
    It isn't a true random number generator or is it ?
    Reply With Quote Edit / Delete Windows 7 India Show Events

  16. Post #2856
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,691 Posts
    So I was in a job interview yesterday, one of the most known and best web dev companies in Lithuania (worked on lots of very high profile projects, they have worked with 7 out of 10 banks in Lithuania) and it went pretty well.
    First of all it's my parents' friends, so I have an instant advantage and secondly, the guys who work there are very friendly, they relaxed and very informal (which I like a lot).

    Anyway, they said they'll probably give me work from second week of August and will be looking for something to do for me until then.

    They also sent me a task which they give to all "candidates to work", which, frankly, if not for 2 requirements, would be rather easy.

    They task goes as follows: (translated from Lithuanian so may contain weird sentences)
    Task is to make a website that allows user to subscribe to a mailing list with different news categories.
    Users must enter their name, email and choose categories (at least one)
    Number of categories may rise in the future, so must take note of that
    Must check that e-mail is valid
    All information must be saved in a file (fuck this shit)

    Admin page so admins can (must be protected with login and pass):
    View who has subscribed (their names, email and chosen categories)
    Sort the list by sub date, email or name
    Edit the subscription
    Delete the subscription

    Of course all of this must be done with a proper HTML, CSS and JS (as in make it look good, not only functional)

    AND we must use CakePHP framework. (I have never used this before, so I need time to learn it...​)


    So yeah, an easy task made fucking ridiculous.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  17. Post #2857
    Cake is pretty easy if you're familiar with MVC, it's heavily influenced by Rails actually. Cake is what what I was using when I first learned about MVC.
    Reply With Quote Edit / Delete Mac United States Show Events

  18. Post #2858
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,691 Posts
    Indeed I am familiar with MVC and to be honest, I'm sure I'll learn it quickly it enough.
    Problem is saving the data in a fucking file. This makes the task go from "easy" to a "fucking pain".
    Not sure why do this, because this has nothing to do with real world situations..
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  19. Post #2859
    MyBigBoner.com
    fritzel's Avatar
    March 2009
    4,547 Posts
    ^^enjoy your regular expressions.
    Reply With Quote Edit / Delete Windows 7 India Show Events

  20. Post #2860
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,691 Posts
    Nah, no need for regex, I'll be using regular arrays for working with data and convert it into json for storage. I'll decode it into regular array for using later again. I've done this before and it's mega easy to do this.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1 (list)

  21. Post #2861
    They're probably seeing how you handle working with data that isn't traditional ORM models in cake. If I were you I'd look at how cake handles models that don't represent database rows and build custom models to do your JSON stuff. You'll either pass the test and do what they were hoping you'd do, or you'll get bonus points for doing things the cake way (assuming they work mainly with cake if they're having you use that)
    Reply With Quote Edit / Delete Mac United States Show Events Agree Agree x 1 (list)

  22. Post #2862
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,691 Posts
    They said they mainly work with cake, so I guess I should do it the cake way, though first I need to learn how to work with the framework.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #2863
    italian
    TerabyteS_'s Avatar
    June 2011
    2,644 Posts
    I'm having some problems though, and I'm not allowed to ask for help from the big boss Mr. Tera, but I need to generate a random 32 bit integer.

    [1000000000..9999999999].sample completely freezes my poor ol' Ubuntu.
    I don't know shit about ruby

    Edited:



    WHYYYYYYYYYYYYYYYYYYYYYY
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Dumb x 7Zing x 1Informative x 1Agree x 1Funny x 1 (list)

  24. Post #2864
    asantos3's Avatar
    March 2011
    936 Posts


    WHYYYYYYYYYYYYYYYYYYYYYY
    I know, it should be the ie icon or a 6. Fuck garry.
    Reply With Quote Edit / Delete Windows XP Portugal Show Events Dumb Dumb x 5Agree Agree x 2 (list)

  25. Post #2865
    Upload Images
    kragmars102's Avatar
    April 2011
    730 Posts
    The icon doesn't define all the languages, however I reckon it still fits nicely.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 3 (list)

  26. Post #2866
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Well yeah, but what does Random.rand() do.
    If you're using 1.9.3, you can use Kernel#rand over a range:

    Code:
    >> rand 1..10
    => 4
    Also, for what it's worth, Ruby's rand uses Mersenne Twister:

    static VALUE
    rb_f_rand(int argc, VALUE *argv, VALUE obj)
    {
        VALUE v, vmax, r;
        struct MT *mt = default_mt();
    
        if (argc == 0) goto zero_arg;
        rb_scan_args(argc, argv, "01", &vmax);
        if (NIL_P(vmax)) goto zero_arg;
        if ((v = rand_range(mt, vmax)) != Qfalse) {
            return v;
        }
        vmax = rb_to_int(vmax);
        if (vmax == INT2FIX(0) || NIL_P(r = rand_int(mt, vmax, 0))) {
          zero_arg:
            return DBL2NUM(genrand_real(mt));
        }
        return r;
    }
    
    Reply With Quote Edit / Delete Mac Australia Show Events Friendly Friendly x 1 (list)

  27. Post #2867
    a2h
    Gold Member

    September 2008
    2,460 Posts
    I dunno if any of you guys have heard of MP3Gain, it's a pretty nice tool that normalises volumes (losslessly) so that your ears don't get blown to bits every time another song comes on

    Anyway, decided to try running Emscripten on the CLI version and holy shit

    Like seriously all I did was only edit the Makefile, run make, run emcc on the output instead of gcc or clang and then motherfucking JavaScript
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Late Late x 1 (list)

  28. Post #2868
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,691 Posts
    They're probably seeing how you handle working with data that isn't traditional ORM models in cake. If I were you I'd look at how cake handles models that don't represent database rows and build custom models to do your JSON stuff. You'll either pass the test and do what they were hoping you'd do, or you'll get bonus points for doing things the cake way (assuming they work mainly with cake if they're having you use that)
    By the way, I found this: https://github.com/cakephp/datasources/tree/2.0
    As I already, I'm still not very familiar with the framework, however, from what I can see, using the ArraySource as the model, I can use arrays to store and edit data just like with a regular sql database.
    Just need to figure out a bit more how to actually use it and how to "feed" it the array. (Can't really find much documentation about it...)
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  29. Post #2869
    The icon doesn't define all the languages, however I reckon it still fits nicely.
    At the end, it all outputs HTML. (usually)
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 2 (list)

  30. Post #2870
    Snip.So
    asciid's Avatar
    February 2007
    181 Posts
    I dunno if any of you guys have heard of MP3Gain, it's a pretty nice tool that normalises volumes (losslessly) so that your ears don't get blown to bits every time another song comes on

    Anyway, decided to try running Emscripten on the CLI version and holy shit

    Like seriously all I did was only edit the Makefile, run make, run emcc on the output instead of gcc or clang and then motherfucking JavaScript

    Give it a go here (only tested in Chrome, confirmed not working in Firefox since an array's too big )
    Nice, but it hogs CPU :( how long did you spend hacking it together?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  31. Post #2871
    italian
    TerabyteS_'s Avatar
    June 2011
    2,644 Posts
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Artistic Artistic x 4Agree Agree x 1Informative Informative x 1 (list)

  32. Post #2872
    Snip.So
    asciid's Avatar
    February 2007
    181 Posts
    This is my current project... its an opensource query browser for php... Does the job better than phpmyadmin

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 3Optimistic Optimistic x 1Programming King Programming King x 1 (list)

  33. Post #2873
    BBgamer720's Avatar
    November 2011
    482 Posts
    I posted it to Programming, but here's another link.

    www.tldrlegal.com
    Oh god thank you! Really helps understand licenses. The GPL license is a mess for anyone who isn't a lawyer - even the simple version.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  34. Post #2874
    a2h
    Gold Member

    September 2008
    2,460 Posts
    Nice, but it hogs CPU :( how long did you spend hacking it together?
    Yeah you have a JS interpreter running what was originally C code that chops up MP3 files and then analyses them, so I'm not surprised it's quite slow compared to native code

    It took me a while to figure out how to set up Emscripten (dependencies suck), but when that's done emcc pretty much lets you use gcc/clang style syntax, even your Makefile if you have one. Using -O2 takes forever though cause that runs the output through Closure Compiler + advanced optim
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  35. Post #2875
    PhiRune's Avatar
    January 2012
    7 Posts
    Here is one of my current projects, it is an image upload website. I think I have done a great job with my first project.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 5 (list)

  36. Post #2876
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,825 Posts
    Here is one of my current projects, it is an image upload website. I think I have done a great job with my first project.
    Cool... does it hash the images and store only one copy for identical images?
    Reply With Quote Edit / Delete Windows 8 Canada Show Events

  37. Post #2877
    secretly a furry
    Jelly's Avatar
    April 2011
    2,022 Posts
    Writing a very scalable nodejs web framework with coffeescript, stylus and eco. View templates are cached and all js and css is compressed.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Artistic Artistic x 1 (list)

  38. Post #2878
    a2h
    Gold Member

    September 2008
    2,460 Posts
    Writing a very scalable nodejs web framework with coffeescript, stylus and eco. View templates are cached and all js and css is compressed.
    Aw what's that crap, have you considered using Scala with increase speed output optimisation using PyPy alongside a full stack MVC quadruple buffered UI-end backbone.js framework?
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Funny Funny x 8Programming King Programming King x 1 (list)

  39. Post #2879
    secretly a furry
    Jelly's Avatar
    April 2011
    2,022 Posts
    Aw what's that crap, have you considered using Scala with increase speed output optimisation using PyPy alongside a full stack MVC quadruple buffered UI-end backbone.js framework?
    I considered using Haskell with a triple bypass buffer overflow with increased support for MongoDB but found that to be too Erlang, if you know what I mean.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Winner Winner x 4Programming King Programming King x 2 (list)

  40. Post #2880
    PhiRune's Avatar
    January 2012
    7 Posts
    Cool... does it hash the images and store only one copy for identical images?
    unfortunately not, but that seems like an excellent idea and I will look up how to do it. Thanks for your question :P
    Reply With Quote Edit / Delete Windows 7 United States Show Events