Thursday, 16 November 2017

Przeprowadzka średnia ruby


Początek Ruby (kupuj w Amazon) to książka programistyczna Ruby przeznaczona dla początkujących użytkowników tego języka. It8217s napisane w formacie instruktażowym i przechodzi przez podstawowe koncepcje programowania do budowy aplikacji internetowych, aplikacji baz danych, demonów sieciowych i aplikacji opartych na GUI. It8217 doskonale nadaje się dla kogoś początkującego w programowaniu, a także dla doświadczonych programistów, którzy są nowicjuszami w dynamicznych językach. Zobacz spis treści. Gdzie kupić Amazon zazwyczaj oferuje najlepszą cenę na początek Ruby. Sprawdź to na Amazon (US) lub Amazon. co. uk (UK). Książka jest dostępna w obu formatach: druk i Kindle. Alternatywnie, wydawca, Apress, ma również książkę do sprzedaży w pełnej cenie detalicznej, jak również wersję e-bookPDF. Początek Ruby ma 27 pięciogwiazdkowych recenzji w serwisie Amazon, ale inne otrzymały recenzje osób trzecich lub e-mail: To nie jest tylko wstęp do Rubiego. Niemal każda technologia powiązana z Ruby jest w jakiś sposób dyskutowana. Autor, Peter Cooper, jest oczywiście dobrze rozwiniętym programistą Ruby, a jego entuzjazm dla tego tematu jest lepszy. I z prawie dwukrotnie większą liczbą stron niż inne recenzowane tu książki, jego wartość jest z pewnością najlepszą wartością spośród tych trzech. 8212 Andy Hudson, Format Linuksa Peter Cooper8217s Początek Ruby: Od początkującego do profesjonalnego ma dwóch odbiorców, nowicjuszy bez doświadczenia programistycznego, którzy chcą nauczyć się języka Ruby jako swojego pierwszego języka programowania, oraz weteranów, którzy chcą dodać Ruby do swojego zestawu narzędzi programistycznych. Odpowiedź Cooper8217s na to wyzwanie stanowi solidny wpis na ograniczonej arenie samouczków Rubiego. 8212 Tim Hunter To musi być najlepsza książka dla początkujących Ruby, bez względu na to, czy chodzi o pisanie scenariuszy, czy przechodzenie do Rails. . Z łatwością 910 w moich oczach nie ma 10, chyba że ma nagość8230.i to nie jest zaproszenie Piotra. 8212 Jamie van Dyke I8217 przeczytał początek Ruby Peter Cooper. I8217m naprawdę pod wrażeniem. . Świetna książka dla nowego programisty lub programisty nowego w Ruby. Jest to świetna alternatywa dla innych książek o Ruby na początku. 8212 Pat Eyler Zarówno książka Chris Pine8217s, jak i poradnik dlaczego8217s mają swoje chwile, ale moim zdaniem książka Cooper8217s ma znaczną przewagę w jasności i użyteczności. . Oprócz tego, że jest to świetna rubinowa książka, it8217 jest także jedną z najlepszych książek 8220tech8221, które I8217ve kiedykolwiek kupił. Trudno jest zauważyć ten poziom jakości w piśmie technicznym. 8212 8220Phren0logy8221 na Amazon Bardzo podoba mi się Beginning Ruby. W ciągu ostatnich dwóch lat uczyłem kurs języka Ruby w CCSF (City College of San Francisco), a I8217ve używał Pickax jako głównego podręcznika. To świetna książka, ale to walka o przystosowanie tego zawiłego bałaganu do sekwencji lekcji dydaktycznych. W następnym semestrze I8217m korzystam z twojej książki (CS132A), ponieważ czuję, że wykonałeś świetną robotę organizowania materiału w poręczne kawałki. You8217ve uratował mi mękę pisania własnego podręcznika. Dobra robota. 8212 Douglas Putnam 8211 Profesor informatyki, CCSF Pracując we wcześniejszych sekcjach i naprawdę cieszyłem się już z tej książki, twój opis orientacji obiektowej jest najlepszy, z jakim spotkałem się w każdej książce. 8212 Caoimh O8217Broin Najlepszy i najbardziej wszechstronny wstęp do Rubiego I8217ve. . Tekst nie jest ani suchy, ani kapryśny, ale stanowi idealne połączenie materiału referencyjnego i praktycznego samouczka. . Prawie chcę kupić drugą kopię ze zwykłego uznania dla Petera Coopera, dostarczając świetnego przewodnika po świetnym języku programowania. 8212 Zeff Morgan Myślę, że początek Ruby: Od nowicjusza do profesjonalisty to lepsza pierwsza książka Ruby niż czcigodny kilof. .. Jeśli chcesz nauczyć się Ruby, to Rubin to książka do kupienia. 8212 Larry Wright, October 2, 2009 183 Zapisano w kategorii Uncategorized Jako autor Beginning Ruby. Zarabiam pieniądze za każdą kopię sprzedaną w formacie drukowanym i elektronicznym (a także różne dochody, które będę później pokrywał). It8217 to niewiele pieniędzy 8211, ale to nie była motywacja do napisania książki. W tym poście I8217m pokaże ci, jak to wszystko działa z mojego punktu widzenia, w tym dane dotyczące sprzedaży. zdjęcia moich oświadczeń tantiem. informacje o moim zaliczce. i podobne makabryczne rzeczy. Na końcu jest nawet sekcja o tym, jak Apress mnie wkurzyła (choć nie żałuję, że z nimi dobrze się wywiązuję 8211, są ogólnie dobrym wydawcą, choć mniej od czasu ich restrukturyzacji) i dlaczego jestem szczęśliwy z tobą, piracąc moją książkę, jeśli tak. wybierz (choć to nie jest żadna zachęta, aby to zrobić) 8211 nadal jest nielegalnie, niestety) Aktualizacja z 19 października: Po otrzymaniu dobrze przez czytelników w Hacker News i Reddit tydzień temu, ta historia została Slashdotted z niedokładnym podsumowaniem 16 października 8211 tego samego dnia, w którym urodziła się moja córka, przekierowałem cały ruch na tę stronę na stronę z donacją na raka, ponieważ nie mogłem odeprzeć nieprzyjemnych komentarzy i miałem wtedy większe rzeczy na głowie. Uważam jednak, że muszę podać dodatkowe informacje w tym poście, aby wyjaśnić kwestie, które zostały źle zrozumiane przez mniejszość czytelników. Te dodane uwagi zaznaczono pogrubioną kursywą. Zaliczka 8220advance8221 to suma pieniędzy, które dostajesz od swojego wydawcy z góry podczas pisania książki. Zasadniczo zaliczka wspiera cię podczas pisania książki, ale naprawdę jest to konieczne, abyś miał pewność, że skończysz książkę. W przypadku pierwszej edycji w 2006 r. Uzyskałem zaliczkę w wysokości 6000. Apress podaje po jednej trzeciej na raz w tych punktach: 1) gdy trzy rozdziały są wypełnione i zatwierdzone, 2) gdy dwie trzecie książki zostanie ukończone, a 3) kiedy manuskrypt jest kompletny. Więc moje 6000 zostało rozłożone na około 9 miesięcy. Uwaga: niektórzy nie-pisarze popełniają błąd, że zaliczka jest rodzajem dotacji lub stypendium, a po wyjściu z książki zarobisz więcej pieniędzy za sprzedaną kopię. Słowo 8220 z wyprzedzeniem 8221 jest dobrze dobrane, ponieważ płatność jest po prostu wynagrodzeniem z góry. Więc jeśli otrzymasz 1000 zaliczek i zarobisz 1000 w tantiemach w pierwszym roku, nie otrzymasz dodatkowych pieniędzy. Opłaty licencyjne powstałe, gdy książka faktycznie sprzedaje 8220pays, 8221 wcześniejszą wpłatę. Jedyną korzyścią dla ciebie jest to, że jeśli twoja książka bomby i nie sprzedaje wystarczającej ilości kopii, aby spłacić zaliczkę, to (zwykle) nie musisz wydać z powrotem ani grosza. Ile kosztuje moja książka Cena detaliczna (RRP) Początku Rubin wynosi 40 (daj lub weź pensję), ale mój wydawca, Apress, zarabia różną sumę na książkę 8211 I don8217t wiem dlaczego (Aktualizacja: I8217ve został poinformowany przez poinformowany czytelnikom, że zmienna cena netto jest taka, że ​​różni sprzedawcy detaliczni i dystrybutorzy uzyskują lepsze rabaty niż inni). W moich deklaracjach tantiemowych wykazano 8220 średnich cen netto 8221, ale to się waha. It8217s zwykle w dowolnym miejscu między 18.00-19.00. Let8217s mówią 18,50. Z tego 18,50 otrzymuję: 10 (1,85) za każdy z pierwszych 4000 sprzedanych egzemplarzy 12,5 (2,31) na kopiach 4001-8000 15 (2,77) na kopiach 8001-12000 17,5 (3,23) na kopiach 12001-25000 20 (3,70) następnie Uwaga: jeśli promuję książkę z linkiem partnerskim do Amazon i dokonuję 4 prowizji od ich 26 sprzedaży, mogę dodać kolejnego dolara za sprzedaż. Pomimo sprzedaży e-booków bezpośrednio o 27,99, cena netto e-booków wynosi około 18.00. Ponieważ nie ma kosztów drukowania lub łańcucha dostaw, masz podwójną opłatę za e-booki. Jeśli twoje drukowane kopie obecnie zarabiają 10 królewskich, powiedzmy, dostajesz 20 na sprzedaży e-booków. Oznacza to przy znaku 10, to 8217 3,70 na e-booka, 4,62 na poziomie 12,5, 5,54 na 15 poziomie, i tak dalej. Dane sprzedaży W książce wprowadzającej do języka programowania, Początek Ruby widział odwieczną sprzedaż 8211 it8217s nie jest to książka czasowa (jak, niestety, 90 książek Rails). Największy wybuch przypada na uruchomienie 8211, jak w przypadku większości książek technicznych 8211, ale sprzedaż nie spadła znacząco w pierwszym wydaniu w całym okresie eksploatacji. W ciągu 2 lat (8 pełnych) sprzedano 7673 egzemplarzy w formie papierowej i 486 książek elektronicznych. Sprzedaż na początku 2009 r. Zwiększyła tę liczbę do około 8500 egzemplarzy w wersji papierowej i 500 e-booków ogółem w pierwszej edycji. chociaż stwierdzenia od 2008 roku są tak trudne do odczytania, że ​​nie uzyskałem dokładnej liczby. Druga edycja Beginning Ruby została uruchomiona pod koniec 2008 r. I ukazała się w sierpniu 2009 r., Więc nie ma jeszcze żadnych danych o jej sprzedaży. Gdy to nastąpi, znowu będę publikować. Ciekawe, czy druga edycja będzie podobna do pierwszej. Inni autorzy Apress sugerują, że tak będzie. W wielkim układzie rzeczy, sprzedanie około 9000 kopii książki technicznej nie jest powodem do wielkiego świętowania lub rozpaczy. Książka z łatwością zwróciła swój postęp w pierwszych dwóch kwartałach, a dzięki Apressowi udało się uzyskać około 170 000 przychodu netto w ciągu dwóch lat (z czego około 19 000 trafiło do mnie). Oświadczenia o stanie magazynowym Najważniejsze szczegóły zostały podane powyżej, ale chcę pochwalić się niektórymi oświadczeniami dotyczącymi opłat licencyjnych Apress8217. W 2007 roku wyglądali tak: Uwaga: Możesz docenić oświadczenie rodziny John Resig8217 za mniej więcej ten sam okres dla Pro JavaScript Techniques. W jakiś sposób moja książka się wyprzedziła, ale uzyskał lepszy postęp. Myślałem, że te stwierdzenia są całkiem fajne. Nie mogłem się zawsze domyślić, dlaczego rezerwa była obliczana tak, jak to było, lub jakie były 8218licencjonowane prawa8221, ale mogłem z łatwością zobaczyć, ile egzemplarzy sprzedano w formacie drukowanym i e-booki na kwartał i miałem dobrą historię i zestawienie moich Zapłata. Uwaga: Zobacz 30 podatków potrąconych u źródła w prawym dolnym rogu Okazuje się, że nie identyfikujesz się jako podatnik w USA (i masz wymagany numer 8211, który, niestety, zmusza cię do składania zeznań podatkowych w USA), podatek w USA człowiek nadal będzie kraść 30 twoich tantiem (choć dziwnie nie twój postęp), żeby sfinansować wszelkiego rodzaju nikczemne bzdury. Na szczęście, jeśli jesteś w jednym z kilku krajów z umową podatkową przynajmniej z USA, możesz odzyskać część lub całość podatku potrącanego z lokalnego podatku dochodowego. Nie jest to jednak łatwe. W 2008 roku Apress wprowadziła nowy, rzekomo lepszy system backoffice, a teraz oświadczenia tantiem są takie: przeprosiny za jakość obrazu Zrobiłem to na moim iPhone i Photoshopped to. Stwierdzenie to pojawiło się dzisiaj i obejmuje jedynie sprzedaż e-booków, która pojawiła się w luce między pierwszą a drugą edycją (dlatego obejmuje tylko około 150 sprzedaży). Tak więc, jest to jedno z prostszych stwierdzeń, które otrzymałem I8217ve, ale wciąż czuję się jak stopień w steganografii, aby to zrozumieć. Dostaję jist, ale robią szalone rzeczy, takie jak podzielenie 12,5 tantiem na część dla 10, a drugą dla 2,5. masz 8220 odpowiednich pozycji w ebooku, 8221 sekcje dodane. Otrzymasz również 8220reserve8221 z powrotem po 18 miesiącach, a także po dodaniu ich. to wrak pociągu w porównaniu z oświadczeniami z 2007 roku. Wiem, że nie jest to jedyny autor Apress, który tak się czuje. Jeśli w powyższych poleceniach nie zobaczysz odniesienia do 8220reserves8221, przewiń kopię zapasową i sprawdź. Zasadniczo otrzymujesz obniżkę honorariów ukrytych przez 18 miesięcy (technicznie 82206 okresów 8221 8211, ale ponieważ okres to jedna czwarta, to 881 17 18 miesięcy), aby zapłacić za 8220returns 8221 8211 książek, które księgarnie odsyłają do wydawcy, którego nie mogą sprzedać . W 2007 roku uważam, że 8211, choć nie jestem pewien 8211, że mam 2200 honorariów zabranych jako rezerwy. W międzyczasie otrzymałem te kwoty. Co ciekawe, podatki za te rezerwy zostały odebrane w 2007 r., Więc mimo, że było 8220ininowo 8221 podatków w USA, dochód się nie zmaterializował do 2009 r. To dezorientuje mnie tak bardzo jak 8132m na pewno. Prawa licencyjne Na powyższych listach opłat licencyjnych powinieneś zobaczyć odniesienia do 8220 Licencjonowanych Praw.8221 Mój pierwszy redaktor powiedział mi, że są to płatności, które otrzymujesz za zagraniczne wersje swojej książki, do włączenia do systemów takich jak O8217Reilly Safari i 8220similar.8221 I8217ve zapytał kilka razy teraz, ale nigdy nie dowiedziałem się, za co te kwoty są przeznaczone, a I8217m nie jest świadomy żadnych przetłumaczonych wydań Początku Rubin. (Aktualizacja: 13 października 8211 6 dni temu 8211 ktoś z Apress skontaktował się ze mną, aby dać mi możliwość zadawania pytań na temat niektórych z tych problemów, ale nie miałem jeszcze odpowiedzi.) Druga edycja 8211 Nowy awans Ale honoraria Wróć do 10 .. Pod koniec 2008 r. Redaktor w Apress 8211 Michelle Lowman (Aktualizacja: Kto, nawiasem mówiąc, był świetnym edytorem). 8211 skontaktował się ze mną w sprawie napisania drugiej edycji Beginning Ruby. Od 2006 roku zmieniło się wiele preferencji bibliotecznych, adresy URL uległy zmianie i było sporo aktualizacji lub nowych sekcji (takich jak odniesienia do Ruby 1.9, nowe biblioteki, rozwój GUI i alternatywne struktury sieciowe). Teraz nie byłem szczególnie zainteresowany zrobieniem drugiej edycji z różnych powodów, ale umowa z Apress mówi, że jeśli nie, to mają prawo robić to bez ciebie, czy ktoś inny klepie książkę i wierzę dostaniesz pieniądze z twoich tantiem, żeby zapłacić za różne drobiazgi. Uwolnienie mojej książki spod nóg nie brzmiało zachęcająco, więc podpisałem się, by to zrobić. Dziwną rzeczą w zrobieniu drugiej edycji jest to, że nie jest tak naprawdę traktowana jako 8220 sekundowa edycja. 8221 Zamiast tego, to jest jak nowa książka. Otrzymujesz nowy awans (6500 w moim przypadku 8211 500 więcej niż mój pierwszy, ale znacznie gorzej z powodu kursu USD-GBP w tym czasie) i musisz wykonać wszystkie te same ruchy, co w przypadku nowej książki. Twoja stawka honorarium i dane dotyczące sprzedaży są nawet przywracane do pierwszego kwadratu. Dzięki temu możesz odzyskać 10 tantiem po zdobyciu 8 punktów sprzedaży po 8000 sprzedaży. Ick. Free PDF Fiasco (lub jak bardzo mnie to wkurzyło) Ponieważ pieniądze nie były zbyt gorące i I8217m bardziej zainteresowane sprzedażą druku, wszedłem w negocjacje drugiej edycji z naciskiem, że wersja elektroniczna książki może być swobodnie dostępna 8211 jako w piwie, a nie w mowie. W końcu sprzedaż e-booków8217 była słaba 8211 wydanie drukowane przewyższało ją 17 do 1 8211, a Apress osiągnęła fatalny wynik 7500 lat w ciągu 2 lat. Podobnie jak Seth Godin i, cóż, setki innych autorów, uważam, że bezpłatne elektroniczne kopie mogą znacznie zwiększyć sprzedaż i sprzedaż. Z książką taką jak Beginning Ruby. większość czytelników chce książki drukowanej, więc wydawało się, że nie ma sensu utrzymywać sprzedaży na rynku z rosnącą konkurencją (szczególnie ze strony Manninga). Nie mam powodu, by sądzić, że mój redaktor nie walczył w moim kącie, ale kiedy brała go na spotkania (gdzie wszyscy najlepsi członkowie klawesy decydowali o tym, jakie książki opublikowali i jak) wróciła, mówiąc, że najlepsi artyści nie byli chętni. Błagałem i błagałem, napisałem kilka zarzutów i zaproponowałem, że będę mógł porozmawiać bezpośrednio z tymi ludźmi, aby uzyskać moje pomysły, ale nie mam nic. Jedyny kompromis, jaki został osiągnięty, to to, że kilka rozdziałów można wydać na miesiąc, oddzielnie 8211, co jest tak samo atrakcyjne dla czytelników, jak uzyskanie dziesiątej części orgazmu. Nawet to nie pomogło mi w zawarciu umowy, a ja ją popchnąłem. (Aktualizacja: Niektórzy czytelnicy słusznie zauważyli, że istnieją różne sprawy biznesowe dotyczące rozdawania e-książek w celu zachęcenia do sprzedaży wydruków 8211, a nie wszystkie książki mogą spełnić kryteria.) Zgodziłbym się na moje pierwsze wydanie, ale moja druga edycja wkracza w znacznie bardziej konkurencyjną atmosferę 8211. Nie jest to już jedyna aktualna książka, a mimo dobrej sprzedaży i świetnych recenzji moja książka nie została zauważona przez dużą grupę najbardziej doświadczonej społeczności Ruby. którzy polecają książki innym Jeśli bardziej doświadczeni ludzie mogą 8220test8221 książkę za darmo, to są bardziej skłonni polecić ją nowo przybyłym. Mój książka nie jest wymieniona nawet na oficjalnie uznanej ruby ​​na stronie ruby-doc. org 8211, to było kiedyś z komentarzem przykrywki obok, ale uważam, że opiekun ma przeciwko mnie urazę). W końcu książka została opublikowana w sierpniu 2009 r. i jeszcze nie wiem, jak to się sprzeda. Tym, co naprawdę rzuciło się w oczy, było ujrzenie innych książek o Apress, takich jak Dive Into Python i Pro Git, które uzyskały pożądany efekt. Możesz przeczytać oba te niesamowite tytuły online, w całości, za darmo. Oferowanie treści elektronicznych za darmo w celu promowania sprzedaży książek drukowanych nie jest pomysłem kosmitów dla Apress, więc ktoś tam gra faworytów. Pirate My Book (Tak, to jest znak zapytania.) (Aktualizacja: jest to najbardziej kontrowersyjna sekcja i najbardziej niezrozumiana.) Mówię zasadniczo dwie rzeczy: 1 8211 jeśli piratujesz moją książkę, myślę, że to jest bardzo fajne i 2 8211 I8217m prowadzi eksperyment myślowy na temat ograniczeń prawnych, które istnieją .. Zauważ, że NIE POWIEDZEMY 8220musisz piracić moją książkę8221 lub 8220przeciążenie prawa i wpadnij w kłopoty8221, jak wierzą niektórzy Slashdotters. Mówię, że to NIE jest dobry pomysł, jeśli nie są świadomi ryzyka, więc nie, nie będę cię ścigał i myślę, że to świetnie, kiedy widzę, że moja książka jest piracka, ale nie mogę popierać łamania prawa.) Moja reakcja na oglądanie innych książek o Apress darmowa, elektroniczna wersja leczenia: I8217m dobra z tobą piractwo moja książka (Aktualizacja: 8220I8217m dobra z tobą8221 NIE znaczy 8220Musisz, 8221 jak wierzą niektórzy Slashdotters.) Teraz, oczywiście, nie mogę aktywnie uczestniczyć w pirackiej mojej książce, ale, heck, jest około 1882 na wielu 8220 darmowych stronach e-book8221 i na RapidShare. Na Twitterze są nawet linki do takich torrentów. Cieszę się, że możesz piracić moją książkę, ale. I8217m NIE PRAWNIKA, i nie mogę zagwarantować, co Apress mogłaby z tym zrobić 8211, więc ty to robisz z własnego plecaka Więc, uhm, don8217t pirat to Jedyny warunek, oczywiście, jeśli to robisz, to jeśli podoba ci się książka i myślisz, że wydrukowana kopia byłaby przepełniona własnymi, kup jeden 8211, nawet jeśli jest to tylko dla kogoś, kogo znasz, który chce się uczyć programowania (Aktualizacja: I8217ve otrzymała e-maile od czytelników, którzy zrobili to dokładnie.) Teraz 8211 eksperyment myślowy. Zgodnie z moją umową, jestem właścicielem praw autorskich do całej książki z wyjątkiem okładki, spisu treści i indeksów. Moja umowa stanowi również, że pozwoliłem wyłącznie firmie Apress na publikowanie i reprodukowanie moich treści. Więc. Podejrzewam, że jeśli wziąłeś moją książkę, usunąłeś okładkę, zawartość i indeksy, i zamieniłeś ją w plik PDF z okładką twojego własnego dzieła, Apress nie mogła nic z tym zrobić, ponieważ wszystko byłoby moimi prawami autorskimi. Teraz nie mogę pozwolić ci na to, ale nie będę cię ścigał, jeśli to zrobisz Więc, hm, nie rób tego (Aktualizacja: Tak, I8217m świadomy, że to jest język 8220cute8221, ale moja wiadomość jest zbyt zaciemniona 8211 Lubię widzieć moją książkę piracką ale nie mogę tego wymagać zgodnie z prawem ani złamać prawa) Wnioski Jako sposób na poznanie, posiadanie czegoś wspaniałego dla twojego rsume lub zaspokojenie ambicji, aby napisać książkę i opublikować ją8222, napisać książkę i zdobyć opubliko - wany przez głównego wydawcy nie jest zły sposób na spędzenie czasu. Jeśli chcesz tylko trochę sławy i szacunku, wystarczy jedna książka. Jeśli chcesz zarobić na dochodach z książek, musisz wypompować kilka książek. To dlatego większość książek technicznych wydaje się być autorstwa autorów, którzy napisali jedną książkę lub wiele książek (wydaje mi się, że pamiętam, że Knuth raz to zrobił). I8217d twierdzi, że dopóki nie napiszesz bardzo niszowej książki (która prawdopodobnie nie zwróci jej zaliczki) lub książki, która prawdopodobnie będzie bardzo popularna, powinieneś unikać głównych wydawców, a zamiast tego znaleźć średniego wydawcę, który może zaoferować bardziej atrakcyjne tantiemy. Zaliczki wyglądają atrakcyjnie, ale jeśli twoja stopa honorarium podatnego jest do bani, nie ma to znaczenia, chyba że uważasz, że nigdy nie otrzymasz go z powrotem. Zamiast tego poszukaj wydawcy, takiego jak The Pragmatic Bookshelf, który może zaoferować 50 tantiem. (Aktualizacja: Było dużo FUD nad stawką opłatę Prags8217, którą Dave tu skontrował.) Nawet jeśli I8217d sprzedał tylko 2000 książek za 18 netto (w porównaniu z 8500 w Apress), to I8217d zarabia te same pieniądze Marketing, który wydawca tak jak Apress może zapewnić nie więcej niż 824 funtów sprzedaży, więc możesz być z przodu. Mniejszym wydawcom łatwiej jest rozmawiać (z tego, co usłyszałem) i można negocjować z nimi lepsze umowy licencyjne. Z pewnością nie mogłem jednak powiedzieć, że żałuję swojego początkowego doświadczenia z Rubinem. Powyższe to wszystko, czego nauczyłem się przez ten proces, i wiele z nich nie zna początkujących nowicjuszy. Zdobycie choćby jednej książki pod ręką dzięki wydawcy 8220regular8221 może otworzyć oczy i mieć duży wpływ na sposób myślenia. I8217ve współpracował z kilkoma naprawdę interesującymi osobami w Apress (większość z nich, niestety, wyjechała lub została zwolniona w dużej scaledown, którą ostatnio zrobili). Efekt Beginning Ruby był dla mnie tylko pozytywny, nawet jeśli nie poszło tak gładko, jak chciał I8217ve. i może być z pewnością gorsze niż otrzymywanie wyrywkowych czeków z niemożliwymi do odczytania oświadczeniami licencyjnymi co kilka miesięcy 8 października 2009 r. 183 Zapisano pod kategorią Bez kategorii. W tym poście chcę śledzić niektóre z 8220 recenzji Ruby 8221 zrobionych na innych blogach przez lata. About8217s Review 8211 8220 Początek Ruby to doskonały wybór dla każdego początkującego programisty Ruby. W obliczu ustalonej konkurencji, Początek Ruby ma swój własny i pozostaje dobrym wyborem. 8221 29 recenzji na Amazon 8211 26 z nich to 5 gwiazdek 3 to 4 gwiazdki. Recenzja Pat Eyler8217s 8211 8220Beginning Ruby to świetna książka dla nowego programisty lub programisty nowego dla Ruby. To świetna alternatywa dla innych książek dla początkujących na temat Rubiego. 8221 Stephen Bartholomew8217s recenzja 8211 8220Even z językiem takim jak Ruby, nauczanie kompletnych nowicjuszy, jak programować, to nie lada wyczyn. Peter Cooper8217s nowa książka 8216Beginning Ruby8217 próbuje zabrać kompletnego początkującego, będąc kompetentnym programistą.8221 Huw Collingbourne8217s recenzja 8211 8220 Po raz kolejny mogę polecić tę książkę jako dobre wprowadzenie do podstaw programowania Ruby i jego zaktualizowanej sekcji w Internecie mile widziane są ramy rozwoju. 8221 Recenzja Slashdot 8211 8220It8217s Dobra książka dla kogoś, kto chce nauczyć się Rubiego jako swojego pierwszego języka programowania. Mogłoby być lepiej. Podobały mi się cierpliwe i przemyślane wyjaśnienia dotyczące instalowania Ruby i RubyGems, jak korzystać z wiersza poleceń i do czego służy edytor tekstu. Cooper dostarcza odpowiedzi na wszystkie typowe pytania typu Ruby-nuby, ale jego wyjaśnienie podstawowych pojęć jest zakłócane od czasu do czasu mylącym odniesieniem do tematów zaawansowanych, a nawet nieistotnych. Dla doświadczonego programisty, który uczy się najlepiej, czytając i pracując nad przykładami, ta książka jest dobrym wyborem. Dave Thomas8217 Programowanie Ruby, Pragmatic Programmer8217 Przewodnik (a. k.a. Pickaxe) jest trudnym konkurentem, ale każda książka zawiera znaczną ilość materiału, którego nie ma w drugiej książce. Na przykład odniesienie do biblioteki rdzeniowej Pickaxe8217s jest wyczerpujące, ale zawiera tylko ograniczoną ilość samouczków wyjaśniających, że zaczyna się siła Rubiego8217.8221 7 października 2009 183 Zapisano w kategorii Bez kategorii Let8217s Rozpocznij: Instalacja Ruby Programming Joy: A Whistle - Zatrzymaj poznawanie Ruby i orientacji obiektowej Ruby8217s Budowanie bloków: danych, wyrażeń i kontroli przepływu Tworzenie pierwszej aplikacji w języku Ruby Ekosystem i klasy społeczności, obiekty i moduły Projekty i biblioteki Dokumentacja, obsługa błędów, debugowanie i testowanie plików i baz danych Wdrażanie Aplikacje Ruby i biblioteki Zaawansowane funkcje Ruby Łączenie go w pary: Tworzenie większych aplikacji sieciowych Ruby: Railsy, ​​Sinatra i Ramaze Ruby oraz Internetowe aplikacje sieciowe, gniazda i demony oparte na graficznym interfejsie użytkownika Aplikacje Użyteczne biblioteki i klejnoty Ruby Załączniki DODATEK A Ruby Primer and Review for Developers DODATEK B Ruby Reference DODATEK C Użycie Pełne zasoby 2 października 2009 r. 183 Zapisano pod pozycją UncategorizedMigration Mimo że migracja kolibra nie jest dobrze udokumentowana przez dużą liczbę zapisów dotyczących pasmowania, znamy kilka faktów i możemy wyciągnąć logiczne wnioski na temat niektórych nieznanych obszarów. (quotBandingquot oznacza pułapkowanie ptaka i owijanie maleńkiego, numerowanego paska aluminium wokół jednej nogi. To jest obecnie jedyną metodą identyfikacji poszczególnych kolibrów. Gatunki są badane poprzez zbieranie danych o dużej liczbie osobników.) Każdy gatunek hummingbird ma swoją własną strategię migracji , a jej niepoprawne myślenie o quothummingbirdach jest jednym typem zwierzęcia, wszystko to samo. W tym artykule omówimy migrację rubinową, ponieważ jest prawdopodobne, że więcej osób zobaczy te gatunki niż wszystkie inne w Ameryce Północnej, a jej dynamika jest podobna do innych gatunków, chociaż daty i lokalizacje są różne. Wyjątkiem jest Hummingbird Annasz, który zazwyczaj nie migruje, ale może wędrować w górę i w dół po sezonowych zasobach żywności. Badania pasmowania sugerują, że poszczególne ptaki mogą śledzić ustaloną trasę rok po roku, często przybywając do tego samego karmnika w tym samym dniu. Nie wiemy, czy jakikolwiek pojedynczy ptak podąża tą samą trasą w obu kierunkach, a istnieją pewne oznaki, że tak nie jest. Dlaczego migrować Jak w przypadku większości naszych ptaków wędrownych, kolibry ewoluowały do ​​obecnych form podczas ostatniej epoki lodowcowej. Były (i w dużej mierze nadal są) ptakami tropikalnymi, ale gdy wielkie pokrywy lodowe wycofały się z Ameryki Północnej, stopniowo rozszerzały swoje zasięgi, aby wykorzystać bogate w umiarkowane zasoby żywności i miejsca gniazdowania, wypełniając niezamieszkane nisze w USA i południowej Kanadzie, unikając jednocześnie intensywnej konkurencji w tropikach. Niektóre gatunki ptaków śpiewających przystosowały się całkowicie do naszego zmiennego klimatu północnoamerykańskiego, po części zostając wegetarianami zimą i nie migrują. Ale kolibry są mięsożercami (nektar jest tylko paliwem napędzającym ich aktywność lęgową) i zależą od owadów, które nie są obfite w mroźną pogodę, więc większość z nich musi wycofać się z powrotem do Ameryki Środkowej w zimie lub ryzykować głodem. Kilku rubinowcowatych pozostaje co roku na wybrzeżu Zatoki Meksykańskiej, zamiast kontynuować podróż do Ameryki Środkowej, być może dlatego, że są zbyt stare lub chore, aby zrobić kolejny lot trans-Gulf lub zbyt młody (z bardzo późnych gniazd), aby mieć czas na wzrost tkanki tłuszczowej i wystarczająco silny, aby migrować swoje szanse przetrwania, zależy od surowości każdej zimy, a wiele z nich ginie w niezwykle chłodnych latach. Kolejna mała populacja zimuje w Outer Banks w Północnej Karolinie. Migracja na północ Większość zimujących kolibrów w okresie zimowym między południowym Meksykiem a północną Panamą. Ponieważ kolibry prowadzą samotne życie i nie żyją ani nie migrują w stadach, pojedynczy ptak może spędzić zimę w dowolnym miejscu w tym zasięgu, gdzie siedlisko jest korzystne, ale prawdopodobnie powraca do tego samego miejsca każdej zimy. Ruby-gardła zaczynają się przemieszczać na północ już w styczniu, a pod koniec lutego są na północnym wybrzeżu Jukatanu, żywiąc się owadami i pająkami, aby dodać grubą warstwę tłuszczu w przygotowaniu do lotu do USA. Meksyku i podąża wzdłuż wybrzeża Teksasu na północ, podczas gdy większość pozornie przekracza Zatokę, typowo wyjeżdża o zmroku na lot trwający do 500 mil, co zajmuje 18-22 godzin w zależności od pogody. Chociaż kolibry mogą latać nad wodą w towarzystwie mieszanych stad z innych gatunków ptaków, nie są quothitchhikequot na innych ptakach. Niektóre kolibry lądują na morskich platformach wiertniczych lub łodziach rybackich, aby odpocząć. Poszczególne ptaki mogą lądować gdziekolwiek pomiędzy południowym Teksasem i środkową Florydą. Przed odlotem każdy ptak będzie prawie podwoił swoją masę, od około 3,25 gramów do ponad 6 gramów, gdy dotrze do wybrzeża Zatoki Meksykańskiej, może ważyć tylko 2,5 grama. Możliwe też, że kilka rubinowych gardeł wyrusza na wyspę przez Karaiby i wchodzi do USA przez Florida Keys. Samce odlatują najpierw z Jukatanu, a następnie około 10 dni później przez pierwsze samice. Ale migracja jest rozłożona na okres trzech miesięcy, co zapobiega katastrofalnemu zjawisku pogodowemu z wymazywania całego gatunku. Oznacza to, że kilka ptaków pojawi się w dowolnym miejscu bardzo wcześnie (kropki na mapie migracji), ale większość populacji pójdzie później, więc możesz nie widzieć swojego pierwszego kolibra przez kilka kolejnych tygodni. Każda osoba ma swoją wewnętrzną mapę i harmonogram, a quotyotropy mogą pojawić się wcześnie, późno lub w dowolnym miejscu w ciągu dwóch miesięcy. Kiedyś w Ameryce Północnej migracja przebiega ze średnią prędkością około 20 mil dziennie, zazwyczaj po najwcześniejszym kwitnieniu kwiatów, które preferują kolibry. Północna granica tego gatunku pokrywa się z granicą sapsucker o żółtych liściach, jeśli najwcześniejsi mężczyźni przybywają do Kanady przed kwitnieniem wystarczającej liczby kwiatów, napadają na studnie sapsucker dla cukru, a także jedzą owady złowione w soku. Migracja na północ zakończyła się pod koniec maja. Badania pasmowania pokazują, że każdy ptak ma tendencję do powrotu co rok do tego samego miejsca, w którym się wykluł, nawet odwiedzając te same karmniki. Zobacz mapę migracji o rubinowo-gardłowych gatunkach i najwcześniejsze daty przyjazdu. Migracja południowa W odróżnieniu od kolibrów i innych kolibrów z zachodnich gór, gdzie mroźne noce są powszechne nawet latem, gardłowe gardła nie są dobrze przystosowane do niskich temperatur, mają trudny okres poniżej połowy dwudziestego (F) i nie wchodzą w odrętwienie jako regularnie jako ich zachodni kuzyni, aby oszczędzać energię. Aby uniknąć zimna i niedoboru żywności, gdy kwiaty przestają kwitnąć, a owady przestają latać, idą na południe. Niektóre dorosłe samce zaczynają migrować na południe już w połowie lipca, ale szczyt migracji w kierunku południowym dla tego gatunku to koniec sierpnia i początek września. Do połowy września, w zasadzie wszystkie ruby-throated na karmniki migrują z dalszej północy, a nie te same osoby widziane w lecie. Trudno to dostrzec, ponieważ wszystkie wyglądają podobnie, ale zostało to udowodnione przez studia zespołowe. Liczba ptaków migrujących na południe może być dwukrotnie większa niż w przypadku podróży na północ, ponieważ obejmuje ona wszystkie niedojrzałe ptaki, które wylęgły się w okresie letnim, jak również żyjące osobniki dorosłe. Dla hummera, który się właśnie wykluł, nie ma wspomnień z poprzednich migracji, tylko chęci, by nałożyć dużo wagi (patrz wyżej) i latać w określonym kierunku przez pewien czas, a następnie szukać dobrego miejsca do spędzenia czasu. zimowy. Gdy dowiaduje się o takiej trasie, ptak może ją odtworzyć co roku, tak długo jak żyje. Początkowa chęć jest wywoływana skracaniem długości światła słonecznego w miarę zbliżania się jesieni i nie ma ona nic wspólnego z temperaturą lub dostępnością żywności, kolibry wędrują na południe w czasie największej obfitości pożywienia. Kiedy ptak jest wystarczająco gruby, migruje. Nie trzeba zrywać karmideł, aby zmusić kolibry do opuszczenia, a jesienią wszystkie ptaki w twoim karmelu i tak już migrują. Jeśli usuniesz swój karmnik, ptaki będą po prostu karmić gdzie indziej, ale nie mogą zawracać sobie głowy powrotem do stoczni w przyszłym roku. Zalecam kontynuowanie utrzymywania karmników do momentu, aż zamrożenie stanie się problemem. Many people notice that adult males migrate earlier than females, because in the last month or so there may be no birds with red throats at feeders. However, remember that immature Ruby-throats of both sexes look much like their mothers. Young males often have a quot5 oclock shadowquot of dark throat feathers in broken streaks, and many develop one or more red gorget feathers by the time they migrate. Immature females may have much lighter streaks in their throats, but no red. There is evidence that fewer Ruby-throats cross the Gulf in fall than in spring, most instead following the Texas coast back into Mexico. Perhaps the hurricane season is a factor, and the genes of many birds with a tendency to fly over water were lost at sea during storms. We still have many more questions than answers about hummingbird migration. Until technology provides radio transmitters small enough for a 3-gram hummingbird to carry safely, banding is the best tool to collect data on individual birds. But since only a few dozen people in North America - almost all of them amateurs like me - are licensed to handle hummingbirds, progress is slow and the odds of recapturing a banded bird are very low. Hi, I8217m Leo. Im a hybrid software developer, designer, marketer and entrepreneur. I am the CEO of Ballistiq. a web software design and development company. A little more about me gtgt Ballistiq Web Development Looking for a trusted, North-American based web development team who has a great track record Ballistiq provides bespoke design and development services. Weve built sites and applications for top companies including Autodesk, NVIDIA, Gnomon School of Visual Effects, Allegorithmic, Luxion and more. Categories Ruby on Rails vs PHP 8211 The good, the bad Note 8211 this article was written in 2017. I8217ve added an addendum to update the article with latest thoughts on May 30th, 2017 at the bottom. I8217ve been developing with PHP since version 2 (a very long time ago). I had been wanting to get into Ruby on Rails and had played with it since version 1 but never had the chance to really use it in production seriously until this past year with Ballistiq. Since then, I8217m now coding 8020 Ruby on Rails and PHP, so I8217ll give my thoughts on the two. At the time of writing, the versions I8217ll be talking about are PHP 5.3PHP 5.4 and Ruby on Rails 3.2 (running on Ruby 1.9.3). The context of this post is comparing the two specifically for web development. Aren8217t you comparing apples to oranges Rails is a framework for Ruby. PHP is a language and has many frameworks. What I8217m mostly comparing is my experiences working with both ecosystems: PHP framework (there are many) vs Ruby Rails (the predominant framework). While some may get hung up over trying to compare the two and may balk at the title of the article, this is a legitimate question that many developers ask. Many developers want to know what are the benefitsshortcomings of both ecosystems and genuinely just want a clear answer. From the popularity of the article via Google, it8217s something that tens of thousands of people actually are asking. Isn8217t it just a preference Yes and no. Both the PHP and Ruby ecosystem are very powerful. In many cases, yes you can just boil it down to a preference. However, there are many strengths for both and it8217s useful to be able to compare them in a level-headed fashion. I8217m not religiously attached to one or another. I8217ve used both. My company works with both. Both are here to stay and play important roles in the global web development industry. PHP 8211 The Good Simplicity and Learning Curve What I absolutely love about PHP is its simplicity and relatively shallow learning curve. When you first get into PHP, all you need is a single HTML web page. Change the extension to. php. Throw in some ltphp code here gt inline PHP, run it on a PHP web server and off you go. It8217s really dead simple for someone totally fresh to get something usable done and deployed within a few minutes. This has been one of the strengths of PHP and why it8217s so darn popular 8212 designers and non-coders can be productive right away. This simplicity, however, comes at a cost. It is a double edged sword as it leads to a lot of sloppy, unmaintainable code. This leads people to use frameworks that force a particular coding standard. The benefit of PHP8217s simplicity and shallow learning curve is a really big thing going for it and this has business benefits too: it8217s easier to find people who know PHP. If you look around, Ruby on Rails developers are more expensive and harder to find. The good developers who really know Ruby and Rails (the L33T ) tend to be more hardcore devs. The documentation for PHP is also fantastic. I find the docs for PHP far more useful than the ones for Ruby and the Rails Guides. The user comments really help and there is a lot of example code that shows you how to solve common problems. It8217s Made For The Web One big thing about PHP is that it really is focused entirely for the web. It8217s not a general purpose programming language like Ruby (or PythonJavaCPerletc.). Many of its inbuilt functions are specific to solving web problems and this makes it a very straightforward language to program for the web. Na przykład. if you want to send a header to the browser, just use the header() function. An MD5 or SHA1 hash is simply md5() and sha1(). It8217s not as straightforward to do this with RubyRails as you have to load in libraries and use namespacesmodules to get to the same functions. Lot8217s of Resources PHP has a ton of resources, frameworks, applications and libraries available for it. From CMS8217 like WordPress and Drupal to frameworks like Symfony and libraries like Doctrine, PHP really has a lot of good resources available. When it comes to deploying a simple CMS, for example, I almost always default to just using WordPress instead of building a Rails app for it. I just feel that it8217s a much simpler solution. Dead Simple to Deploy Deploying PHP is dead simple. At its simplest, you just FTP the files to a web server (which we at Ballistiq never do 8211 we deploy using Git). Thing is, with PHP you don8217t have to know about or care necessarily about the web stack. Many hosting services just use a LAMP environment (Linux, Apache, MySQL, PHP), so as long as your files are in place they just run and that8217s that. Even using a framework like CodeIgniter is relatively simple as you don8217t ever need to use the command line 8212 you just copy the entire framework directory onto the server and run. That8217s it. PHP 8211 The Bad Its Evolution Led to a Lot of Bad Code This is not a direct feature flaw of PHP, but is the result of years and years of building on top of a simple scripting language that was specific to solving simple web problems. PHP was not always Object Oriented. Even when it did support OOP, for years it was not really OOP (missing important features like static methods), so programmers got around the problems through all kinds of shenanigans like using global variables or setting a local variable using a global reference pointer. Na przykład. Typical pre-PHP5 code These are just a couple of examples, but there are more which I won8217t go into here. It8217s unfortunate but is just one of the side effects of working with a language that has evolved rapidly. One thing that drives us crazy at Ballistiq is going into projects where we have to upgrade or maintain applications written with old PHP. This is the case with one of our largest projects where we8217re trying to upgrade a large app written in PHP4 code and it is horrific. A lot of sloppy code there that we have to work with. Better Coding Standards Lead To Really Purist Code As mentioned above, sloppy code is not an inherent feature flaw of PHP. It8217s just how people have used the language. As PHP has gotten more popular, it8217s gotten a lot of influence from enterprise developers who take a really purist approach to programming. When you go to conferences and listen to these PHP experts talking about best practices, PHP no longer becomes fun to program. You8217re almost looking at a Java program. Classes explicitly declare namespaces, importing namespaces, explicit getter and setter methods, explicit declaration of publicprivate methods, etc. The code becomes extremely verbose. Now If you want to see a framework that takes a more purist approach to things, check out Symfony. It8217s a great PHP framework that8217s ready for enterprise level usage but from a development point of view, I find it tedious. Ruby on Rails 8211 The Good Mature Framework The more I develop on Rails, the more I really appreciate and love it. I8217ve found that it enables us to create higher quality products for clients much faster, that are more maintainable. It8217s a mature and stable framework that many large companies are comfortable with introducing into their environments. Compare this with the PHP ecosystem that has many frameworks 8212 there8217s a risk of selecting a framework and finding that it8217s just not that well supported several years from now (we made this mistake). Speed and Development Joy I absolutely love working with Rails because as a development platform, it is extremely automated. So many menial tasks have been automated so that you just focus entirely on solving the business problem instead of hacking your way around a framework. Some things really going for Rails in this regard are: GeneratorsScaffolding 8211 Provide a very good starting point for developing around. Some PHP frameworks now provide scaffolding features. GemsPlugins 8211 the Rails community provides a wealth of plugins as Ruby Gems that you simply add to your project Gemfile and install. This significantly accelerates development and maintenance time as you8217re not trying to integrate disparate libraries, it8217s already done for you. Active Record ORM 8211 Of all the ORM8217s I have used (for PHP I8217ve used DataMapper DMZ, FuelKohana, Doctrine), ActiveRecord in Ruby on Rails is simply the best. It actually works and is remarkably straightforward to use. Integrated testing tools 8211 I love it that out of the gate, Rails has a testing framework that can be used. In PHP, many frameworks have only recently been trying to integrate PHPUnit, to varying degrees of success. As a programming language, Ruby is really quite an amazing language. Unlike PHP, it really is Object Oriented from the ground up. Its code is very concise and powerful. Gems (extensions) enable you to bolt on needed functionality. After coding in Ruby, I find coding in PHP (or anything else really) rather tedious. Ruby on Rails 8211 The Bad Steep Learning Curve My main beef with Ruby on Rails is that it actually has a steep learning curve. Do not believe the hype that says that it is really easy. They will show you podcasts where you build a simple blog application using scaffolding and voila Instant website. Nothing could be further from the truth. Rails is seen to be easy because they have automated many things in the framework 8212 this does not make it easy to understand. Developing a Rails app and deploying it actually requires you to know the full stack. With PHP, you can just cobble together some inline PHP code, FTP it to a server and off you go. In Rails, you really need to know what you are doing from the web server (Apache or NginX), setting up Phusion Passenger and database engine. Then you have to deal with the asset pipeline process to prepare your app to run in Production mode. It8217s not as simple as running it in production mode 8212 you have to precompile your assets and make sure files are actually there. If they are not, Rails will simply blow up and you have to find out why by accessing the Rails logs. Compared to PHP, Rails is also unfriendly when it comes to errors. With PHP, it will spit out errors at you in development and the error messages actually make sense. Typically a page will render but the part with the error will show you which line the error occurred and the message is useful. In Rails, typically the whole app blows up. One last thing to throw in is that good Ruby on Rails developers tend to be polyglots. They are able to pick up and learn many languages. While beginners are battling to just learn Ruby, Rails people are using CoffeeScript instead of Javascript, SCSS (or LESS), and Slim or HAML. For a newcomer to Rails, part of the steep curve is not just learning Ruby and the Rails framework, but all these other languages as well Ruby is not an easy language I8217m sorry to offend some people here, but Ruby is simply not as straightforward as PHP to learn. It is by all intents an extremely powerful language. I choose to use Ruby simply because as a developer I feel it is a much better language than PHP. But from a learning perspective, it is not. Ruby has many features that are simply not straightforward for a beginner programmer to understand. One such concept are blocks, procs and lambdas, which Rails uses heavily. The classic Ruby on Rails example I will use is for creating a form: If you8217re new to Ruby, you can be forgiven for saying, 8220Wait a minute8230.what8217s f8221 Yes sir. Welcome to blocks. Here8217s a bit of an extreme example : Even as an experienced programmer, I went crosseyed when seeing the above line of code. It8217s very simple actually 8211 generate an 8 character random string. Another area is meta programming. Here8217s an example: I8217ve taught Ruby on Rails to experienced developers and this always trips them up. What exactly is hasone. hasmany and hasandbelongstomany. It looks like it8217s some kind of reserved keyword or declaration as these are not encapsulated in a method. However, in Ruby, ALL code is executed. Every line of code is executed, so hasone. hasmany and hasandbelongstomany are just methods that execute when the class is declared. Finally another thing that makes Ruby challenging for beginners is its loose syntax. Let8217s look again at the above code. It8217s not obvious (to a beginner) that hasone :address is invoking a method because the brackets are missing from the method invocation. In PHP, the syntax is stricter and this makes it simpler for beginners to know what8217s what. As a language, especially if you8217re coming in from others such as CJavaPHP, Ruby is challenging and it will bend your mind. Once you8217re up and running though, it8217s fantastic and many who have taken the leap really enjoy coding with it. Conclusion So from all of that, what do I conclude PHP is a friendlier entry point into web development than RubyRails. It8217s easier, there are more resources available and you can get results fast. Despite this, I personally enjoy working with Ruby and Rails more than PHP. For many of the reasons I8217ve described in this article, I just feel that the Ruby ecosystem offers a superior toolset for developing applications. I respect that the die-hard PHP fans won8217t feel the same way 8211 that8217s cool. My opinion has formed from working with both languages and ecosystems thoroughly in production. Since moving to Rails, I8217ve never really felt much of an urge to move back to developing with PHP and so all my new projects tend to be RubyRails. At Ballistiq. we develop in both. If a client project already has existing PHP code and we8217re developing for that, needing to integrated at the software level, we stay in PHP. If a client needs a brand new application, or we are building our own app use Rails. Addendum 8211 30 May 2017 Wow it8217s been a while since I wrote this and it continues to be a very highly ranked article on Google, which attracts a lot of traffic. Because technology advances at such a breakneck pace, I wanted to update this article with some new thoughts. PHP has come a long way since I wrote this article When I wrote this article, PHP was in a bit of a transitory phase as many folks were still using PHP 4 and trying to migrate to 5. Symfony 2 had not yet been released, and Laravel just was not a big thing. As of right now, PHP is having a bit of a renaissance. Here are some great technologies that really make PHP shine: Laravel 8211 As a framework, Laravel looks really excellent and many PHP folks have chosen it as their framework of choice. I can8217t speak for it because I haven8217t used it in production. But it does look good. Composer 8211 Composer is to PHP what RubyGems Bundler is to Ruby. It does package management that doesn8217t suck. For years the PHP community had to deal with Pear, which really didn8217t gain much traction. PHP web server 8211 For the longest time, developing with PHP on your computer meant that you had to rely on an external web server like Apache. Many devs ended up installing MAMP. As of PHP 5.4, PHP now comes with its own command line web server, and it8217s actually remarkably easy to fire up. Now, not everything works with the command line web server (I had trouble getting WordPress to boot up with it), but if you8217re developing with a framework that supports this, it8217s a much nicer and saner way of developing. Codeception 8211 One of our team members at Ballistiq gave a really nice talk about a testing framework called Codeception, and I have to say it actually looks decent, supporting things like Selenium and BDD style tests. HHVM 8211 Opensource project led by Facebook, this takes PHP and compiles it to bytecode that in turn gets translated into x64 machine code and runs really fast. This is a very interesting project that makes PHP highly performant and scalable. So PHP isn8217t going away anytime soon. Many people use it and put it to good use. However, I (and many web engineers) have moved on. As engineers, we8217ll hack in anything that we need to get the job done, however, by choice, I won8217t start a new project in PHP. Why I feel that there are more interesting solutions out there that are worth looking at. Why I still love Rails as a framework and Ruby as a language As I mentioned back in 2017, I really enjoyed working with Ruby and Rails. Despite it8217s steep learning curve, after a while I hit a groove and now the applications that we are delivering are so good that I can8217t imagine going back. Here8217s some of the things going for RubyRails that I feel really make it such a strong choice: Gems 8211 When I started coding in Ruby, Gems confused me more than they helped because there was too much 8216magic8217. Once I learned that you could (and should) just read the source code for gems, everything made so much more sense. Due to the pluggable nature of gems and the community8217s standards, gems can give your application a tremendous amount of functionality very quickly. Some gems that I cannot live without: Devise (authentication 8211 handles user logins, social sign on, forget password workflows and so much more), Paperclip (file uploads 8211 even handles uploading to S3, image croppingresampling), Simple Form makes forms incredibly simple to standardize and render on websites. Mountable Engines 8211 We did a mammoth project for a Fortune 500 company where after building the initial application, it was so successful that other departments wanted the same application, but with slightly different functionality and different UI. Rather than copypasting the application and having to support several codebases, we were able to extract most of the core functionality into a Rails mountable engine, and literally have one codebase but several websites. The client was absolutely thrilled with this and it was a huge win for us. Scaling 8211 Rails has a stigma of being unable to scale and they are referring to Twitter dumping Rails. We have not found any scaling issues with Rails and we have applications that run with millions of pageviews and hundreds of thousands of users each month. The fact is, majority of you will never have the scaling problems that Twitter had. And8230in fact, we found it easier to scale with Rails than with PHP. How First of all, Rails supports caching out of the box. You8217re able to do view fragment caching within your application code and use Redis as a cache store. That is a far simpler solution than trying to use Varnish which caches everything that goes through it and leaving logged-in users without caching. Using built-in Rails caching enabled us to scale easily. Secondly, Rails Capistrano Chef makes it very simple to scale to multiple server environments very quickly. Our typical Amazon AWS infrastructure includes Elastic Load Balancer, several application server instances a redissearch server, backed by an RDS database instance. We set up server provisioning with Chef, enabling us to provision a new ready-to-run instance in minutes. Simultaneous deployment complete with data migrations can be done with Capistrano from the command line. Literally, I type in cap production deploy:migrations and everything is magically deployed to all our application servers. Users don8217t see any downtime as we have Phusion Passenger Enterprise and rolling restarts. Background jobs 8211 PHP was designed as a hypertext pre-processor which means that it executes only when there is a web request. Compared with Ruby which runs a process. In Rails, you can easily set up background jobs using Sidekiq or Resque. This also adds to Rails8217 ability to scale easily. In our applications, we move a lot of stuff that can slow down requests like emailing users into background jobs. Now, PHP can do background jobs using Gearman but that8217s not standardized 8211 you have to install the PECL extension. In RubyRails, background jobs are a non-issue. You just do it. Rails is BORING 8211 Rails is now at version 4.x. It8217s a mature framework. It8217s boring now. The cool kids are touting NodeJS these days. Rails is boring because it8217s robust and stable. We8217ve developed apps in Rails now for some of the world8217s largest companies and people in their IT departments don8217t bat an eyelid. It8217s known that it8217s a good choice to build your (robust, enterprise-ready, scalable, performant) application on. Other technologies that I think are shaping the web AngularJS 8211 We introduced AngularJS into our client projects earlier this year for two Fortune 500 companies and it was a huge win. AngularJS enables you to build single-page applications that run in Javascript. Most of your front-end logic goes into AngularJS, and your backend simply because an API that serves JSON. Doing this, we were able to build highly performant applications. The user experience is very good with this approach because pages load extremely quickly as the browser does not have to do a full roundtrip request. NodeJS 8211 I started developing in NodeJS a few months ago and it blew my mind. What NodeJS is very good for is building networked applications. Na przykład. if you8217re building a real-time chat application, you can use NodeJS for that. Due to the maturity of Rails, I don8217t think we8217re moving off that anytime soon for building large applications, but to add real-time components, I would use NodeJS SocketIO . So what should you do Web development is becoming incredibly complex. The days of a single developer being able to ship a full application from start to finish are becoming more difficult. Even front-end can no longer be handled by a single hybrid designerdeveloper who can hack CSS HTML markup. If you are just starting out, I still recommend that you start with PHP. You will get results much faster, and this will fuel your growth and knowledge. Jumping into RubyRails as your first language might leave you really frustrated trying to get results 8211 remember, with Rails, you have to know the full stack so it8217s not just the language and framework you8217re challenged with. Once you8217re comfortable with building bespoke applications in PHP, you can then whet your appetite and start using other technologies like RubyRails and even NodeJSExpress, and you8217ll appreciate what these technologies offer. Many of the concepts you will learn from PHP in frameworks like Symfony amp Laravel will carry over to other languages and frameworks. Another reason why I recommend PHP as a great starting point is that it8217s very useful to know so that you can hack on things like WordPress themes and plugins. WordPress is so widely used today in business (especially marketing departments) and it8217s great to have software polyglots who can work with many different tools and platforms. The thing that you have to realize is that the Web is not about what language you choose to develop with 8212 it8217s about the standards and what it takes to get information in and out of the web browser. It doesn8217t matter what is on the server, as long as it spits out HTML and the right JSON data 8211 you can use C for all anyone cares. That8217s why there are so many web technologies from PHP to Ruby to Python to to Java and gosh Perl is still used (I met a guy that wrote a Shopify App entirely in Perl). So there you go. Keep on hacking You can do anything in PHP that you can in Rails and visa versa. That8217s enough for me to stick with PHP. As far as Rails being faster to deploy, I really doubt it. There is not much time that can be saved in PHP vs. another language with the existing frameworks I already use (unless of course, we build AI to start programming code). Nice article. I totally agree because I8217ve had the same experience coming from a PHP background over to RoR. I8217m just glad I8217m not the only one that thinks learning Rails is difficult. I8217m still trying to get my head around Coffeescript. I would like to offer some advice to readers, a really good way to learn Ruby and Rails is by doing the FREE SaaS course from Edx (edx. orgcourseuc-berkeleycs-169-1xsoftware-service993 ). Not only will you be learning solid Ruby on Rails, but you will learn good engineering aspects and end up with a certificate from Berkeley University as well Other than that, I can recommend the Ruby on Rails Tutorial 2ed by Michael Hartl. and Head First Rails (O8217 Reilly). Remember, the more you give RoR a chance, the more you8217ll love it. Great write up. Im more of a javascript guy who occasionally uses php for the server side. Since node came, started to use javasript on the server side too. A lot of the cool tools that I use like Jekyll, Sass and compass are written in Ruby, so I always got tempted to learn ruby. I have observed a lot of my colleagues moving to Ruby or Python because they feel that being a php programmer just doesn8217t get the same respect. Great, balanced article Leo, thank you for not hyping one or the other and remaining objective about your experience. Deployment complexity of RoR concerns me, while I like the other aspects. Nice article. Im both PHP and Ruby on Rails programmer. I choose Rails because unlike PHP there8217s too many to study depending on your needs. A lot of framework and cms. While Ruby, rails is all you need. you can do scale apps. Really helpful article, Leo. I8217ve been dipping my toes into web development for the last six months and have been working mainly with PHP, however Ruby on Rails is next on my list of languages. As an experienced web developer, would you suggest I continue with PHP and move on to Rails after I get some experience Or jump right into Rails Hi Michael. I think it is valuable to know both. Definitely in the current climate a knowledge of Rails will get you a job very quickly as there is more demand and less competition. If you are completely new to web development, I think PHP is a better starting point because you will get results faster, which will spur you on to continue in web development. I can8217t stress enough how small successes build on each other. You can build a good, custom MVC application quickly using something like CakePHP or CodeIgniter. When you do move to Rails, I8217d advise not to learn Rails first. Learn Ruby first and try using a framework like Sinatra to start with. My reasoning is that Rails has too much 8220automagic8221 which makes it very difficult to understand what is happening under the hood. If you don8217t understand what Rails is doing under the hood, and you don8217t know how to look in Rails source code and figure it out, debugging your applications can be very long and frustrating, especially for a beginner. Thanks for the helpful response Leo I definitely agree that learning the Ruby is super important before jumping into Rails. There8217s definitely a lot to learn for me still but I8217m super excited and motivated by each little success. Cheers Couldn8217t agree more. As a newer Ruby and RoR dev, it was instrumental that I learned Ruby first. While RoR is Ruby at its core, it handles a lot of the rudimentary tasks for you8230 hence, Rails 8220Magic8221. If you don8217t have a decent grasp on how to use Ruby without a web framework, what8217s going on under the hood will absolutely frustrate you, especially when it comes to debugging or even understanding what the right toolmethod is for the job. Great article, Leo I, like most others, appreciate the fair and balanced representation of both languages and their respective frameworks. or chars (8216a8217..8217z8217).toa Array. new(8).join First language I ever learned was Turbo Pascal. Then Java. First web programming language I learned was PHP. Very informative. I8217m new to programming and am looking at both PHP and Ruby as server-side languages (I8217ll decide which one to go with once I8217m in to it a bit more). I agree that PHP is easier to pick up 8216off the bat8217 but it is very hard to find good quality tutorials or guidance out there. It8217s ridiculous really seeing as it8217s been around for so long. On the other hand Ruby does have a steep learning curve (though learning PHP in tandem seems to have helped me understand it) but the resources for learning that are out there are both easier to find and a whole heap better. Code school, for example (check it out if you8217re new to development) is a fantastic resource8230 but doesn8217t even touch PHP. I see Ruby as the SS language of the future. I am working on Ruby on rails. Using Ruby on rails to build rock solid code thus quality websites that will be easy to maintain afterwards. Ruby on Rails is also well known for its coding convention, Agile practices and security strength. But it is valuable to know both Nice article. I8217ve been getting into web dev with Rails over the past few months and it8217s nice to see that I8217m not alone in my belief that it simply isn8217t very intuitive. The comparison is indeed like apples and oranges, but it is useful when considering which area to focus on studying. I8217m currently picking up industry experience with Rails, but am hesitant to commit to going the full mile in that area because the curve is so steep, and I don8217t know if I want to be a Rails dev. Good article. I feel exactly the same way. After gt10 years php and Java I learned to like ruby. And the peace of mind that rails gives me in a stressful project. Blindly knowing where to put new code even after 12 hours of coding at 4 in the morning. But I really hate the complexity you mentioned concerning the infrastructure setup. Some people enjoy that 8211 I don8217t. Live is too short for such stupid tasks. I always wonder why can8217t the RubyRails folks manage to create a setup routine that8217s as as easy as php Why do I have to fight with Ruby version gem version mac OSX version inconsistencies for 2 days before rails server will run the first time Grmpffff8230. Actually, you don8217t have to 8220fight with8221 versions. 8211 Ruby versions: Generally managed by rbenvrvm et al. (rbenv is officially recommended by Rails 8211 rubyonrails. orgdownload ). If your native Ruby satisfies the Ruby version required by the project at hand (e. g. 1.9.3 for Rails 4, 1.8.7 for Rails 3.2) then you are good and you don8217t need those tools. But if you are doing client work, or even experiments (e. g. your main project is Rails 3, you are experimenting onplanning on switching to Rails 4) you8217ll need multiple Ruby versions running simultaneously in the same machine. You can use Vagrant et al. but that can8217t beat having it in your base OS. Rbenvrvmetc makes this possible only with a few lines of commands. You can say that one can just use the latest possible Ruby, but it doesn8217t always work like that (compatibility problems etc). Now try that with PHP. There are PHP version switching tools but they were nowhere near maturefull-fledgedeasy-to-use as rbenvrvm last time I checked. 8211 Gem versions: Seriously Show me a single languageframework with a packagedependency manager that doesn8217t involve version numbers (e. g. PHP8217s composer, Python8217s PIP, Closure8217s Leiningen, Java8217s Maven) Ever heard of DLL Hell 8211 Mac OSX: I8217m an Ubuntu user but I8217d be surprised if you can8217t get anything related to RubyRails working in MacOSX, seeing that most Rails developers are using Macs. 8211 You need to to install rbnevrvm on a machine only once. After that, you can install any version of Rubies and Gems in a matter of minutes. And with Heroku, you can see your thing in interwebs in seconds. And you have proven deployment tools like Capistrano which works for any empty Linux box. Yeah, PHP shared hosting is really ubiquitous (in most of which you still can8217t reliablysecurely run modern PHP frameworks), but here the scopes are really different. 8230from a long time PHP user who is busy switching to Laravel 4 and Rails 4 at the same time in production projects for the last 1-2 months. I8217m just finishing up a big L4 project and about to get started with ROR myself. hi leonard I am from India this article is very useful I want some suggestions on building a big eCommerce website. I have a good experience of making website in asp, asp Ajax and sql server 2008. Now I am thinking about moving from Microsoft (because of cost). Please help me choose between php(plain),php with mvc framework, django (not rails because of steep learning curve and updating the website after the host has updated the version).I have no experience on any of the above three. and I will develop alone and I want to cost to be on lower side. Any help would be useful Thanks for this article. As a programmer who8217s been out of the loop for a while (no pun), I had suddenly been preached to about RoR by kids who had never been across other languages. as if RoR was the be all and end all. Your article clarifies all the pros and cons very objectively. Much appreciated. As a would-be programmer starting out and slightly overwhelmed with all the languages and pressure with choosing one: really interesting article. Thanks Thanks for this Article. I8217m using PHP (Laravel framework) for development and Codeception for automate testing. Should I try RoR I8217ve heard that RoR have testing amp deployment tool which help us saving time a lot. Do you have any recommends for me. Thank you in advance We can not compare a programming language with a framework for a programming language. If you don8217t get this then you must start to learn again. A very well considered, helpful and well written article. Thank you Leo. Just read your article. I started my developing 8216career8217 in ASP webforms, which was quite easy and then switch to MVC with scaffolding, razor, nuget, entity framework, jquery, etc. It seems to me that Microsoft8217s stack is well-build and although I found it hard to learn MVC, it all fits together. Maybe they have 8216stolen8217 all good ideas from other frameworks and languages but they combined them very well and build a great IDE. So why does no one use it these days I read a lot of articles about what framework and language is the best, but they never compare it to ASP. Is it 8216just8217 because it8217s Microsoft The best article i8217ve ever read about ruby n php. Thanks for this Meanwhile, in Morocco: Hi. I loved your blog and it helped me a lot. Thank you so much I wanted to ask you one thing My first Rails app is a mobile app that will start with almost 1 million users (from another app my company is buying) and also a web application, like Facebook that you use in the browser and on your iPhone. I don8217t know how many nodes I can start with and I can8217t find a lot of information online. We have one server (16 GB RAM) I am using to test load balancer, database replication I can create as many VPS in the server as it fits in this server. I don8217t know if 16 GB will be enough for 1 million users but I created 6 nodes for staging (and learn): 8211 one with Nginx for load balancing (512MB) 8211 two with Unicorn for the Rails application (1GB each) 8211 two for MySQL (one master, one slave, but I still have to learn how to make Rails read from slave and write in the master, 2GB each) 8211 one for files (512MB shared via NFS with the load balancers and apps, where paperclip will write). The database will have a lot of writes. What architecture configuration you recommend Am I too wrong I used small RAM because I will use more for production but I don8217t know if 6 nodes is enough or if 16 GB will be enough. Can you help me Thank you 1 million users who are logged in, or 1 million users per month who are mostly just browsing the site Also, is the Rails application going to just be for an API or will it actually deliver the pages It also depends on the memory footprint of your application, if it is large or not. 1. 16GB is not likely enough for 1 million users if it is a reasonably sized application, and for that number of users I wouldn8217t put everything on a single server anyway. I8217d load balance across 2x 16GB (or 32GB) servers, quad cores minimum and scale from there. Remember, Ruby applications tend to bloat with lots of gems that you load in. The typical way to scale is to get as much memory as possible and run as many concurrent processes as you can in memory. 2. I would not use Unicorn. It is flaky and consumes a lot of memory. For that kind of scale, I would use Passenger Enterprise. If you want to be cheap and not pay for the Passenger license (which is worth it), you can use Puma. 4. Cache, cache, cache. Have one server just for Redis and cache the hell out of your application: guides. rubyonrails. orgcachingwithrails. html 5. Move slow processes into Sidekiq for background processing. Dziękuję bardzo. It is 1 million users registered but usually 20,000 to 300,000 concurrent connections. And it8217s HTML and JSON, depends of the extension. We want to grow, of course, so need to be ready to more. I thought Unicorn was the best. I was using memcached but I will try Redis. Thank you very much again. It was hard to find something online explaining how much memory and how many servers in the load balancer and things like this. Just think about this: if Facebook was done in PHP, which is probably the most robust and used web application in the planet, you don8217t need to be a very smart person to realize php is far from being a bad programming language. in fact, PHP in the next 5 years will become the definitive best web programming language on top of every other one by far. Why Because its syntax is more human readable. The only reason why RoR is so trendy, is because it did very cool stuff a few years ago not available in php. But php is getting better day by day, frameworks like laravest are getting tremendous attention, and even bringing back old php users who are dropping RoR and coming back like prodigal sons. Yes, RoR deserves the credit of pioneering MVC and many other things, but it lacks the beauty and simplicity of C syntax, which will reign forever and ever. There8217s a lot of hype regarding RoR, most people try RoR just because they want to feel trendy and cool, one of the reasons most hipsters use it. Don8217t be a victim of the phenomenon. PHP is not a trendy thing, PHP, without all the noise and propaganda, still dominates the web. Juan David Pasts Rivera Another alternative is Meteor, which is great, is a framework on top of node js, is the one I like the most from all that I have tried: derbyjs, deployd, sails, express, from what I remember. Even when it8217s not comparable with Angular, Meteor supersedes it since you have 2 way data binding and backend logic at the same time and written in JavaScript, also you don8217t have to learn ng attributes. PHP has Facebook as a great representative, but its syntax is not as simple as you can get with Meteor and preprocessing packages. Anyway, scaling is always another whole story, it8217s a huge work which can be done in all languagesframeworks, I am not sure in which of them is easier though. If that8217s so then why does nobody choose to write apps in COBOL or BASIC anymore Why would you choose CoffeeScript over Javascript Why has Apple created Swift when people can just as well use Objective-C Why does it take a non-speaker on average twice as long to learn Russian compared to Italian To say it8217s all about preferences and claim that somehow all languages are equal is pretty naive. I like Php spent a lot of time learning it built most projects in Php and will continue doing so. The only reason I8217m learning ROR now is because I get tons of job offers some remote. I look at it this way freelance jobs I8217m using Php. Contract long term company jobs ROR I guess. I8217m currently in between angularjs now because at my company we wanted to try this out with Ruby as the backend. So imagine the steep learning curve I8217m going through for both of these languages Ruby and AngularJS at the same time.

No comments:

Post a Comment