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.
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.
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 :(
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.
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.
Also I've got to say I completely fell in love with Ruby.
:) always glad to hear that.
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.
Use Random.rand()
Now why is that suddenly extremely fast, and it can generate a number over the max size of a integer.
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.
Well yeah, but what does Random.rand() do.
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.
Oh, okay![]()
Me as well, I have to dive a bit deeper though into it than what I am doing right now. ( Using rails )
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.
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.
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..
^^enjoy your regular expressions.
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.
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)
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.
I don't know shit about ruby
Edited:
WHYYYYYYYYYYYYYYYYYYYYYY
I know, it should be the ie icon or a 6. Fuck garry.
The icon doesn't define all the languages, however I reckon it still fits nicely.
If you're using 1.9.3, you can use Kernel#rand over a range:
Also, for what it's worth, Ruby's rand uses Mersenne Twister:Code:>> rand 1..10 => 4
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; }
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
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...)
At the end, it all outputs HTML. (usually)
Nice, but it hogs CPU :( how long did you spend hacking it together?
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.
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
Cool... does it hash the images and store only one copy for identical images?
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?
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.
unfortunately not, but that seems like an excellent idea and I will look up how to do it. Thanks for your question :P