Jump to content

Recommended Posts

Posted

Designatix answered you but it's not only this thing.

Imagine this topic in marketplace section with these bugs inside ;)

Also there are many shares that deserves your question and not mine for sure :P.

I'm gonna update it to be completed and reshare it

Thank you for your good words my friend!

i love your idea, i always try to do new things (but since i'm newbie on java i can only imagine them xD) so it's good to see new things. I'll be waiting for the update :D

Posted

i love your idea, i always try to do new things (but since i'm newbie on java i can only imagine them xD) so it's good to see new things. I'll be waiting for the update :D

if you can imagine ( that is good ) just try to write it ( is not so hard ) 

 

Designatix answered you but it's not only this thing.

Imagine this topic in marketplace section with these bugs inside ;)

Also there are many shares that deserves your question and not mine for sure :P.

I'm gonna update it to be completed and reshare it

Thank you for your good words my friend!

is not so bad ( drama ) ... just need 1 simple rework 

Posted

if you can imagine ( that is good ) just try to write it ( is not so hard ) 

Well, it's not that easy, my ideas are not that simple for a newbie to make them..

Posted

Can't get it, so you're saying that few unnecessary calls that give you a dummy empty list are cleaner than nullptr ? Its obvious that this emptylist should be used on other cases but here? Explain me why this is worst and I will go to fck off right away

 

final ArrayList<Coupon> coupons = getCoupons(player);

if (coupons == null)

{

     //msg and exit

}

{

else

{

   for (Coupon c : coupons)

        c.something();

}

 

if getCoupons returns empty list instead of null, the flow of the rest code is dumb and nonsense. null checks are as fast as 1 == 1

 

I personally believe (and most ppl on the internet, so far, since the time I checked it) it's not to the developer to care about null behavior. Or at least, as low as possible.

 

An empty list for looping does nothing, since it iterates on nothing it doesn't reach internal content of loop. The overhead is minimal.

 

It's just cleaner code-wise and in the developer's mind, you are sure you won't face any null, anywhere, anytime. So building new methods associated to such empty container become "easier".

 

Performance-wise, you win almost nothing using null since you call a static list (and what would be heavy with my method is the creation of the list).

 

But well since you explained you see it as a "error" and not an "exception" (so far it's called NullPointerException, not NullPointerError :D), what you say is correct, for yourself. If you seek on the internet the "standard" behavior, however, it's not that. After it's personal preferences, personally when I see a null I drop it, it remembers me the dark age of L2JIL where everything was tested using null, even if not needed ; so you were losing tracks of what could be null and what couldn't.

Posted (edited)

Imagine this topic in marketplace section with these bugs inside ;)

 

Most of shares made for L2JFrozen so far (with all due respect for sharers).

Edited by Tryskell
Posted (edited)

One interesting thing to add : grade type is counted as part of reward list. That way your system works even for low/mid rates servers.

 

Grade could be written on coupon in order player doesn't accumulate them when he reach lvl 80 (so a grade C coupon will still be a grade C coupon).

 

Obviously you have to write more reward lists :D.

 

Another thing : create a specific HTM for no coupon behavior (instead of the 20 non clickable "+").

Edited by Tryskell
Posted (edited)

I personally believe (and most ppl on the internet, so far, since the time I checked it) it's not to the developer to care about null behavior. Or at least, as low as possible.

 

An empty list for looping does nothing, since it iterates on nothing it doesn't reach internal content of loop. The overhead is minimal.

 

It's just cleaner code-wise and in the developer's mind, you are sure you won't face any null, anywhere, anytime. So building new methods associated to such empty container become "easier".

 

Performance-wise, you win almost nothing using null since you call a static list (and what would be heavy with my method is the creation of the list).

 

But well since you explained you see it as a "error" and not an "exception" (so far it's called NullPointerException, not NullPointerError :D), what you say is correct, for yourself. If you seek on the internet the "standard" behavior, however, it's not that. After it's personal preferences, personally when I see a null I drop it, it remembers me the dark age of L2JIL where everything was tested using null, even if not needed ; so you were losing tracks of what could be null and what couldn't.

 

Most of shares made for L2JFrozen so far (with all due respect for sharers).

 

One interesting thing to add : grade type is counted as part of reward list. That way your system works even for low/mid rates servers.

 

Grade could be written on coupon in order player doesn't accumulate them when he reach lvl 80 (so a grade C coupon will still be a grade C coupon).

 

Obviously you have to write more reward lists :D.

stop the drug plz or change simple yous first message ... why you need 3 message ? you talk alone ?

Edited by pirama
Posted

stop the drug plz or change simple yous first message ... why you need 3 message ? you talk alone ?

 

I thought you would have enough time to post between each.

Posted

I thought you would have enough time to post between each.

and again you are wrong :)

 

[GR]

exei kaei 

Posted

Tryskell, Pirama, with all respect guys, please don't start this flame and here. Respect Merlon's share.

 

Thanks!

ah Baggo You Don't Know What Real Love Means,This flame is just love :D 

 

on Topic nice idea melron thanks for share

Posted (edited)

ah Baggo You Don't Know What Real Love Means,This flame is just love :D

 

on Topic nice idea melron thanks for share

hahahah pirama love you re, more than Tryskell. :o 

 

Merlon thanks for this share mate.. It's a fresh idea.  :1010:

Edited by 'Baggos'
Posted

On the other hand if coupons were empty you dont even need to check.

All you do is:

 for (Coupon c : coupons)

        c.something();

 

No null checks, no NPE possibility, safer and cleaner code.

And if you seriously look at me in the face and tell me that returning null and checking it for performance reasons is better then you are not as smart as i thought you were.

 

idk how java optimizes empty list or empty loops, I don't even think it does, I always prefer nullptr due to the fact that things are straightforward once you have it. Imagine storing it somewhere and having to check if the character has any coupons, personally I prefer coupons == null than a dumb list.isEmpty() on an immutable empty list, I believe this case is just coding style, but my C background forces me to go with nullptr.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • I was looking for  server with a low rates,eventually i found l2 elixir.I Joined beta and after so many years since 2008 i found  a friend that we played together, memories came back. i cant wait for the grand oppening!. dont miss it!
    • Seems legit, for sure deserves a try!
    • SOCNET VERIFICATION SERVICE — is a universal solution for those who value security, convenience, and quality. We turn the verification process into a convenient, fast, and highly confidential experience. Thanks to our service, any of your accounts receive identity confirmation, an increased level of trust from platforms and users, as well as protection from bans, fraud, and risks.   Promotion: Pay for your first verification and get a 10% discount on the second one! 💎 We help with verification on Fragment, crypto exchanges ByBit, Gate, Bitget, OKX, Binance, PayPal, KuCoin, and social networks LinkedIn, Facebook, Instagram, Twitter (X) and many other platforms! 💎 Verification for any service: crypto exchanges, trading platforms, hosting providers, casinos and other websites. Why choose us:   Premium quality — we use the most advanced verification methods. High processing speed — accelerated verification on leading platforms, online services and social networks. Full confidentiality — your personal information is protected. Increased trust and status — a verified account boosts influence and improves conversion. Individual approach — we work with bloggers, brands, businesses, and private clients. Simplifying complexity — we handle issues when dealing with foreign services. Important! Services related to illegal activities are strictly prohibited! 💳 Service pricing   ✅ Verification of individuals — from $30 (the exact cost depends on the required location and service/app/website). Learn more 👨‍💼 The cost of business verification for companies or legal entities is discussed individually with the service administration. Learn more If you want us to register your account on the required service and verify it — you will need to additionally pay 10% of the transaction amount. Available payment methods: cryptocurrency, credit cards, PayPal, and other payment methods in our online store and Telegram bot.   ⭐ Our Online Store ⭐ SOCNET.STORE ⭐ Telegram Store ⭐ SOCNET.SHOP ⭐ Our SMS Service ⭐ SOCNET.APP ⭐ Our Telegram Bot for buying Telegram Stars ⭐ SOCNET.CC ⭐ Our SMM Panel ⭐ SOCNET.PRO   ✅ News Resources ➡ Telegram Channel ➡ WhatsApp Channel ➡ Discord Server     ⭐ We invite you to COOPERATE and EARN with us ⭐ Would you like to sell your product or service in our stores and earn money? Become our partner or offer mutually beneficial collaboration? You can contact us via the CONTACTS listed in this topic. ✅ Contacts & Support ➡ Telegram Support ➡ WhatsApp Support ➡ Discord Support: socnet_support ➡ Email Support: solomonbog@socnet.store   Terms of Use and Refund Policy If you have any questions or issues, our fast support service is ready to respond to your requests! A refund for a completed service that does not fully meet the requirements or the declared quality is possible only if the product description includes a warranty and a valid warranty period. In other cases, a full refund for the service will not be provided! By purchasing such a service, you automatically agree to our refund rules for non-provided services! Refunds for countries selected by mistake are not provided after verification. To complete verification, you must provide full access to your account. We currently accept cryptocurrency, credit cards, PayPal, and other payment methods in our online store and Telegram bot! We value every client and provide replacements in case of invalid accounts via our contact channels! Attention: Your order will be delivered to your personal Google Drive/Mega.nz via a link (check the link, click “View content”) within 24 hours after the order confirmation! If you purchased more than 1 item at once, your entire order will be delivered via the first link! The remaining links will be empty! You will automatically receive an email notification after delivery! If you pay on our website via PayPal, you must pay an additional 20% commission (minimum $1). To avoid this commission, you can pay me directly via PayPal — instructions are available on the website! Refunds for items purchased by mistake or due to “I chose the wrong product and did not use it” are not accepted! You are fully responsible for your actions before and after purchase.
    • SOCNET VERIFICATION SERVICE — is a universal solution for those who value security, convenience, and quality. We turn the verification process into a convenient, fast, and highly confidential experience. Thanks to our service, any of your accounts receive identity confirmation, an increased level of trust from platforms and users, as well as protection from bans, fraud, and risks.   Promotion: Pay for your first verification and get a 10% discount on the second one! 💎 We help with verification on Fragment, crypto exchanges ByBit, Gate, Bitget, OKX, Binance, PayPal, KuCoin, and social networks LinkedIn, Facebook, Instagram, Twitter (X) and many other platforms! 💎 Verification for any service: crypto exchanges, trading platforms, hosting providers, casinos and other websites. Why choose us:   Premium quality — we use the most advanced verification methods. High processing speed — accelerated verification on leading platforms, online services and social networks. Full confidentiality — your personal information is protected. Increased trust and status — a verified account boosts influence and improves conversion. Individual approach — we work with bloggers, brands, businesses, and private clients. Simplifying complexity — we handle issues when dealing with foreign services. Important! Services related to illegal activities are strictly prohibited! 💳 Service pricing   ✅ Verification of individuals — from $30 (the exact cost depends on the required location and service/app/website). Learn more 👨‍💼 The cost of business verification for companies or legal entities is discussed individually with the service administration. Learn more If you want us to register your account on the required service and verify it — you will need to additionally pay 10% of the transaction amount. Available payment methods: cryptocurrency, credit cards, PayPal, and other payment methods in our online store and Telegram bot.   ⭐ Our Online Store ⭐ SOCNET.STORE ⭐ Telegram Store ⭐ SOCNET.SHOP ⭐ Our SMS Service ⭐ SOCNET.APP ⭐ Our Telegram Bot for buying Telegram Stars ⭐ SOCNET.CC ⭐ Our SMM Panel ⭐ SOCNET.PRO   ✅ News Resources ➡ Telegram Channel ➡ WhatsApp Channel ➡ Discord Server     ⭐ We invite you to COOPERATE and EARN with us ⭐ Would you like to sell your product or service in our stores and earn money? Become our partner or offer mutually beneficial collaboration? You can contact us via the CONTACTS listed in this topic. ✅ Contacts & Support ➡ Telegram Support ➡ WhatsApp Support ➡ Discord Support: socnet_support ➡ Email Support: solomonbog@socnet.store   Terms of Use and Refund Policy If you have any questions or issues, our fast support service is ready to respond to your requests! A refund for a completed service that does not fully meet the requirements or the declared quality is possible only if the product description includes a warranty and a valid warranty period. In other cases, a full refund for the service will not be provided! By purchasing such a service, you automatically agree to our refund rules for non-provided services! Refunds for countries selected by mistake are not provided after verification. To complete verification, you must provide full access to your account. We currently accept cryptocurrency, credit cards, PayPal, and other payment methods in our online store and Telegram bot! We value every client and provide replacements in case of invalid accounts via our contact channels! Attention: Your order will be delivered to your personal Google Drive/Mega.nz via a link (check the link, click “View content”) within 24 hours after the order confirmation! If you purchased more than 1 item at once, your entire order will be delivered via the first link! The remaining links will be empty! You will automatically receive an email notification after delivery! If you pay on our website via PayPal, you must pay an additional 20% commission (minimum $1). To avoid this commission, you can pay me directly via PayPal — instructions are available on the website! Refunds for items purchased by mistake or due to “I chose the wrong product and did not use it” are not accepted! You are fully responsible for your actions before and after purchase.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock