Thursday, February 29, 2024

Financing Crisis Becomes Acute


Inflation shows no sign to tame
Depreciation gets the blame.

A week ago Bangladesh Bureau of Statistics (BBS) revealed that January inflation is hovering around 9.86%,indicating increase in price levels. Gradual contractionary policy has yet to come into effect. The rise in inflation necessitates another round of increase in policy rates. Despite assurance from the Indian govt, rice and onion markets remain volatile. Prices of other kitchen commodities are troubling the Middle class and the poor alike.

Financing the budget has become so worrisome that PM even advised to not hold any iftar (fast-breaking event) party during the fasting month of Ramjan. Earlier NBR chairman in a series of talks with the businessmen made it clear that govt may discontinue providing subsidies to big groups indefinitely.

In this backdrop, govt has decided to increase the electricity price once more,which is anticipated amid the acute budget deficit. This time electricity price is likely to go up by 70 paisa/unit,an 8.50% increase at the retail level(Source: “Khuchra Porjae Bidyuter Dam Barchhey 8.50%”,Bonik Barta,February 29,2024) . Earlier, gas price was also raised by 75 paisa/unit. Govt provides Taka 390 billion and Taka 60 billion subsidy to electricity and gas. In addition, govt provides Taka 260 billion capacity charge to independent power providers. This move is strongly criticized at home since it swallows a good deal of public money. Meanwhile, reason put forward for the electricity price hike is the pass-through effect of depreciation that raised the cost of electricity generation. This year central bank plans to depreciate further the currency, a move likely to shrink the GDP in dollar estimates.

Earlier Bangladesh Bank introduced Dollar-Taka swap policy for the banks. In this policy, commercial banks can swap their excess dollar holdings with market rate equivalent amount of Taka. When they need dollar,they can deposit required taka amount at the central bank and get the dollars. The measure was taken to inflate the central bank's forex reserve in a bid to meet IMF target for March.

In brief, so far inflation situation worsened at the start of the 2024. Government concentrates on cutting subsidies ,which resulted in raising the utility prices. Businessmen fear further rise in cost of doing business. Austerity appears as the more feasible option for the govt. I think it is the policy delay that should be blamed instead of the pass-through effect. If we were not stuck with the 9% and 6% lending rate and deposit rate respectively for far too long, things might look different and pass-through effect might not reign in. Point is to make Taka stronger policy rate is the ultimate tool and we did not use it in the past.

La Semaine Dernière A Mes Yeux




(24 février --- 01 mars)

Cliquez pour voir/cacher
Ma Semaine Gastronomique
Date Petit déjeuner Déjeuner Dîner Snacks,Sucreries,Boissons et Fritures
24 Pain,Omelette Riz,Omelette,Soupe aux lentilles Riz,Soupe aux lentilles,Omelette,Pianju ---
25 Pain,Omelette Riz,Haricot avec Poisson bombili sec Riz,Soupe aux lentilles,Omelette, Pianju ---
26 Pain,Haricot avec Poisson bombili sec Riz,Soupe aux lentilles,Omelette Riz,Haricot avec Poisson bombili sec,Poisson puntio barbe ---
27 Pain ,Omelette Riz,Poisson koi,Pomme de terre avec petit poisson Riz,Pianju,Pomme de terre avec petit poisson ---
28 Pain,Omelette,Papaye --- Riz,Pianju ---
29 Pain,Omelette Riz,Poulet,Soupe aux haricots mungo Riz,Poulet,Soupe aux haricots mungo ---
01 Patate douce Riz,Soupe aux lentilles, Ruhi Riz,Soupe aux lentilles, Ruhi ---

Wednesday, February 28, 2024

প্রক্সি

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,composition,JavaScript সম্পর্কে পূর্ব ধারণা।

Proxy: Proxy pattern এ সাধারণত একটি proxy object প্রতিস্থাপন করে আসল object কে। আসল object এ প্রবেশাধিকার নিয়ন্ত্রণের জন্য এমনটি করা হয়। এছাড়া কিছু বাড়তি functionality ও এটি যোগ করে আসল object টিতে। Client/User এই proxy object এর মাধ্যমে real object এর সাথে যোগাযোগ করে।

  • Remote proxy(আসল object যেটি অন্য এক address এ আছে তার local copy তৈরি করা)
  • Virtual proxy( object আকারে বড় হলে load করতে সমস্যা হতে পারে এজন্য তার minimum কিছু feature নিয়ে proxy object নিয়ন্ত্রণ করা)
  • Protection proxy( অন্য object a প্রবেশ নিয়ন্ত্রণ করা)
হচ্ছে Proxy pattern এর নানা ব্যবহার। উদাহরণে Proxy object এর show() method একটি নির্দিষ্ট digit এর উপর ভিত্তি করে Real object এর show() method দেখাচ্ছে নচেৎ একটি নির্দিষ্ট বার্তা দেখাচ্ছে।

উদাহরণঃ(script tags এর মাঝে নিচের কোড বসবে)

class Demo{
show(){}
}
class Real extends Demo{
constructor(a){super(a);}
static plain(a){return new Demo(0);}
static special (a){return new Demo(a);}
show(){
document. write("Demo...");
}
}
class Proxy extends Demo{
constructor(){super();}
static plain(a){return new Demo(0);}
static special (a){return new Demo(a);}
show(a){
if(a==3){
var r=new Real(a);
r.show();
}
else
{
document.write("Sorry!no demo.");
}
}
}
var p=new Proxy();
p.show (1);

চেষ্টা করা যাকঃ Message interface তৈরি করতে হবে যার RealMessage ও Proxy subclass থাকবে। Proxy'র show() method একটি string variable নিবে argument হিসেবে। যদি string variable আগে থেকে নির্দিষ্ট করে রাখা variable এর সাথে মিলে যায় তবে RealMessage এর বার্তা দেখাবে নচেৎ অন্য বার্তা দেখাবে।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও আমার তৈরি করা নানা program থেকে।
মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Tuesday, February 27, 2024

স্টেট

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,composition,JavaScript সম্পর্কে পূর্ব ধারণা।

State Pattern:এটি object কে তার অবস্থার পরিবর্তনের সাথে সাথে behavior পরিবর্তন করতে দেয়। যখন behavior অবস্থার(state) উপর নির্ভর করে এবং run-time এ object কে তার behavior পরিবর্তন করতে হয় তখন State pattern ভাল ফল দেয়। আবার কোন program এ যদি অসংখ্য state কে if-else অথবা switch statements দিয়ে একটি class এর ভেতর প্রকাশ করা হয় তবে এটি জটিল হয়ে পড়ে এবং ভবিষ্যতে একে modify করাও কঠিন হয়ে পরে। আলাদা interface তৈরি করে প্রতিটি subclass যদি এক একটি state কে প্রতিনিধিত্ব করে এবং ঐ state এর সাথে জড়িত behavior কি হবে তা ঠিক করে দেয় তবে program কে ভবিষ্যতে আরো বিকাশের সুযোগ তৈরি হয়।এসব ক্ষেত্রেও State pattern বেশ কাজে দেয়।State pattern Behavioral Design Pattern এর দলে পরে।
উদাহরণে Bakery interface তার subclass Regular, Cookies,Muffin,ChocoCake এর মাধ্যমে bakery item এর state গুলো প্রকাশ করছে আর disp() method ঐ state এর behavior সম্পর্কে বলছে। Context নামে একটি class তৈরি করে তার attribute হিসেবে State object ব্যবহার করা হয়েছে। আর run-time এ set() method এর মাধ্যমে internal state পরিবর্তনের সুযোগ রাখা হয়েছে। Client/User এই Context class এর মাধ্যমে State object এর সাথে কাজ করবে। উদাহরণে Context এ current state হিসেবে Bakery তে ঠিক করা হয়েছে Regular state,যেটির behavior হচ্ছে Flat bread বানানো। এরপর run-time এ set() এর সাহায্যে State পরিবর্তন করে ChocoCake ঠিক করা হয়েছে,ফলে behaviorও পরিবর্তিত হয়ে Chocolate cake বানানোতে চলে গেছে।

উদাহরণঃ(script tags এর মাঝে নিচের কোড বসবে)

class Bakery{
constructor(){}
disp(){}
}
class Context{
constructor(a){this.a=a;}
set(c){this.a=c;}
request(){
this.a.disp();
}
}
class Regular extends Bakery{
constructor (){super();}
disp(){
document. write("Flat bread");
}
};
class Cookies extends Bakery{
constructor(){super();}
disp(){
document.write("Cookies");
}
}
class Muffin extends Bakery {
constructor(){super();}
disp(){
document.write("Muffin");
}
}
class ChocoCake extends Bakery{
constructor(){super ();}
disp(){
document.write("Chocolate cake");
}
}
var r =new Regular();
var c=new Context(r);
c.request();
var cc=new ChocoCake();
c.set(cc);
c.request();

চেষ্টা করা যাকঃ একটি program লিখি। CCTV নামে একটি interface যার Right,Left,Straight আর Rotate নামে subclass থাকবে আর সবার des() নামের method থাকবে যা behavior নির্দেশ করে। আগের মতই Context নামে class থাকবে। সবার আগে Context ছাড়া শুধু CCTV নামে একটি class এর ভেতর switch statements ব্যবহার করে Right,Left,Straight এই state গুলোকে ব্যবহার করে program টি লিখি। পরে State pattern ব্যবহার করে program টি লিখি।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।
মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

ব্রিজ

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃclass,inheritance,composition,JavaScript সম্পর্কে পূর্ব ধারণা।

Bridge Pattern: এটি আলাদা করে abstraction কে implementation থেকে। এটি structural design pattern এর দলে পরে। ধরা যাক একটি শার্ট কিনতে হবে। শার্ট কি ধরণের হবে –সাধারণ না প্রিন্টেড এটি বিবেচনার বিষয়। আবার শার্টের আকার ও বিবেচনার বিষয়। এখন Shirt interface কে implement করতে যেয়ে আমাদের inheritance এর উপর নির্ভর করলে PlainMedium,PlainLarge,PrintedMedium এবং PrintedLarge এর মত subclass তৈরি করতে হবে। এখন শার্টের অন্য ধরণ (যেমন: Stripes) যোগ করলেও আমাদের আকারের বিষয়টি মাথায় রেখে StripesMedium ও StripesLarge subclass করতে হবে। এখানে inheritance ধরণ আর আকার এর মাঝে এক binding সম্পর্ক তৈরি করে দিচ্ছে । কাজেই এই জটিলতা এড়াতে এখানে ধরণ ও আকার এর জন্য Shirt ও Size নামে আলাদা দুটি interface তৈরি করতে হবে আর Size object কে Shirt class এ attribute হিসেবে ব্যবহার করতে হবে( Composition এর উদাহরণ)।এখানে Size কাজ করছে bridge এর। এখন run-time এ Shirt object গঠনের সময় যেই Size দরকার তার object দিয়ে দিলেই হবে। দরকার পড়লে Shirt ও Size class দু'টির বিকাশ ঘটানো যায় ( যেমন:Shirt এ Printed ও Size এ Small নামে দু'টি subclass যোগ করা যায়) স্বাধীনভাবে,program এ কোন সমস্যা/ জটিলতা না বাড়িয়ে।

উদাহরণঃ(script tags এর মাঝে নিচের কোড বসবে)

class Size{
constructor(){}
des(){}
}
class Shirt{
constructor(a){ this.a=a;}
des(){}
getA(){ return this.a;}
}
class Plain extends Shirt{
constructor(a){super(a);}
des(){
document. write("Plain Shirt:");
super.getA().des();}
}
class Printed extends Shirt{
constructor(a){super(a);}
des(){
document. write("Printed Shirt:");
super.getA().des();}
}
class Medium extends Size{
constructor(){super();}
des(){
document. write("Medium size is chosen.");
}
}
class Large extends Size{
constructor (){super();}
des(){
document. write("Large size is chosen.");
}
}
var m=new Medium();
var p=new Plain(m);
p.des();
var t=new Printed(m);
t.des();

চেষ্টা করা যাকঃ Online courseএ ভর্তির জন্য Duration কে মাথায় নিয়ে একটি program লিখি। Online এর attribute হচ্ছে Duration class। Individual ও Group নামে Online class এর দু'টি subclass থাকবে ।আর Short ও Long নামে Duration এর দু'টি subclass থাকবে । সবার des() নামক method থাকবে।ঠিকভাবে কাজ করলে এটি নিচের বার্তা দেখাবে:

Individual/Group course:
Long/Short duration is chosen.

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।
মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Sunday, February 25, 2024

স্ট্র্যাটেজি

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,composition,JavaScript সম্পর্কে পূর্ব ধারণা।

Strategy pattern:এটি একগুচ্ছ algorithms এর মাঝ থেকে program চালানোর সময়(run time) একটিকে নির্বাচনের কাজ করে থাকে। এটি Behavioral pattern এর দলে পড়ে। এখানে Behavior কে Class থেকে আলাদা করা হয়। Strategy pattern এ method কে inherit করা যাবে না। যেমন: Gym এর সদস্যদের বকেয়া চেয়ে message পাঠাতে হবে। এজন্য সাধারণ,বিশেষ ও কিশোর সদস্যদের জন্য দরকার আলাদা আলাদা সম্ভাষণযুক্ত message। একারণে Message নামে আলাদা একটি interface তৈরি করে সদস্যদের ধরণ অনুযায়ী subclass গঠন করা হয়েছে। say() method এর মাধ্যমে Message দেয়া হচ্ছে। বৃদ্ধ (Old) নামে আলাদা class গঠন করে Message class এর বিকাশ ঘটানো যায় তবে এর কাঠামো change করা যাবে না। এটি হলো Open/Closed principle এর উদাহরণ যা আমরা SOLID principle এ জেনেছি।Gym নামে আরেকটি interface গঠন করে তার subclass GymManager এ Message এর attribute ব্যবহার করা হয়েছে,যা composition এর উদাহরণ। remind() method এ ঐ Message subclass এর method call করা হয়েছে। GymManager এর object এ program চালানোর সময় Message এর যেই subclass দরকার তার object গঠন করে দিয়ে দেয়া হয়েছে। তারপর GymManager এর object তার method remind () কে ব্যবহার করেছে। উদাহরণে run time এ Special () এর object তৈরি করে pass করা হয়েছে GymManager এর object এ।

উদাহরণঃ(script tags এর মাঝে নিচের কোড বসবে)
class Message{
constructor (){}
say(){ document. write(" Respective message goes here.");
}
}
class Special extends Message{
constructor(){super ();}
say(){ document.write("Dear Special Member,Greetings from Gym Y. Please clear your dues!");
}
}
class Regular extends Message {
constructor(){super();}
say(){ document.write ("Dear Member,Greetings from Gym Y. Please clear your dues!");
}
}
class Ado extends Message{
constructor(){super ();}
say(){ document. write ("Hello there!Greetings from Gym Y. Please clear your dues!");
}
}
class Gym{
constructor(){}
remind(){}
}
class GymManager extends Gym{
constructor(a){super();
this.a=a;}
static plain(a){ return new Context(" ");}
static messCon(a){return new Context(a);}
remind(){
this.a.say();
}
}
a= new Special();
c=new GymManager(a);
c.remind();

চেষ্টা করা যাকঃ Online Food Manager নতুন,সাধারণ ও বিশেষ সদস্যদের জন্য New Product(৩ টি implementation) সম্পর্কে জানাবে।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।
মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Friday, February 23, 2024

Joint Defense Production: Some Points To Note


Proposal floated in a seminar
Ushers change in defense in particular.

Last week Indian High Commission organized a seminar and proposed joint production of defense equipment and sharing of technology. It is indeed a good proposal came from a neighbouring country that allowed private sector in defense article manufacturing. The country has a good track record of allowing the press to report on corruption on defense sector. This proposal if comes into fruition will boost the governance situation in our defense sector.

India has long ago offered a $500 million line of credit to import defense equipment from India. Bangladesh spent some of the credit to import bus, truck ,floating bridge and other nonlethal equipment. India continues to offer the line of credit. Recently, India offered to sell 105 mm light cannon to Bangladesh. In addition, maintenance ,repair and overhauling plant for the MI-17 helicopter fleet that Bangladesh set up with the assistance from the Ukraine will likely to get benefit from the Indian proposal. India has the license to manufacture some parts of this kind of helicopter and in future it is going to decommission large part of its MI-17 fleet, opting for the Western options as well as the domestic ones. Bangladesh on the other hand is going to induct more units of MI-17 helicopter as it is equipping both the BGB and the Police with this kind of helicopter. Sanctions on the Russian Federation mean Bangladesh will likely to hinge on India to procure future MI-17 units and its parts or produce the parts with Indian consent.

Indian private sector has long been operating in Bangladesh. In fact, it is the Indian private sector that opened up manufacturing and assembling facilities in the automobile sector in Bangladesh. Hero Honda first set up its motorbike assembly plant in Bangladesh. Later, other Indian and Japanese companies followed its step. Mahindra has a mini truck assembling plant in Comilla. Bajaj last year set up an assembling plant for three-wheeler after a Bangladeshi company demonstrated its ability to manufacture three-wheeler locally. Similarly, many Indian companies that researched and built prototype of Indian defense article for Indian Army but did not manage to get world attention may open facility for such equipment for the Bangladesh Armed Forces as well as for the world as Bangladesh has a very liberal and competitive export policy.

There are some hurdles in this endeavor. First, Bangladesh does not have proper policies and guidelines for engaging local / foreign private sector in defense article manufacturing. So we need proper guidelines and laws to ensure smooth participation of private sector, constitutional protection for the press for reporting on corruption in the defense sector and to make strong parliamentary committee on defense to administer regular hearing on defense related issues. India has Defense Acquisition Procedure(DAP) 2020 and the USA has Defense Production Act (DAP) 1950 and other laws and regulations to address the issues. In my piece“Need Policies For Domestic Defense Production” on November 30,2023,I highlighted the matter. Apart from that we also need laws to compensate individuals and groups who may fall victims of wrong policies / misconduct of any member of defense community.

Second, in our country public spending /resources often fall into wrong hand as proper check and balance mechanism is not in place. I have recently come across a documentary that reveals how agency people in a powerful country operate shadow company/front line company/think tank to misappropriate local resources and spy on others(Watch the docu).In Bangladesh, we witness how grand scale misappropriation of local resources/public spending often goes off the radar or seldom talk about at the highest level of defense community. Working with such front line companies at the end of the day will not bring any benefits.

Third, companies registered in the stock exchange have greater transparency than those who are not registered. Stakeholders and shareholders ask about their decisions and seek explanation. As they want answers,the press often provide them information through regular reporting. Unfortunately, most of the Army run subsidiaries are not in the stock exchange. Many of them are overusing public resources. If subsidiaries like BOF,BMTF, Radisson ,Army Golf Club sell some shares to the public and the private sector ,then stakeholders will question about their spending and decision making and government will not have to spend much on these subsidiaries. Any Indo-Bangla joint venture has to make sure these subsidiaries sell shares to the private sector. It will be boon for our capital market.

It is indeed a good news that India has shown keen interest to joint defense article manufacturing. It will transfer technology and pave the path for other future foreign investment. Thriving motorbike industry is the example. Moreover,Bangladesh will be able to get greater market access to Indian consumer market and will augment its export volume in the country. The crucial aspect of this proposal is it will bring the necessary transparency and accountability that our defense sector currently lacks.

Thursday, February 22, 2024

এডাপ্টার প্যাটার্ন

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,JavaScript সম্পর্কে পূর্ব ধারণা।

Adaptor Pattern: adaptor এর কাজ যেমন কাজে মিল নেই এমন দু'টি জিনিসকে নিয়ে একত্রে কাজ করা ,তেমনি adaptor pattern এর কাজ হলো অমিল দু'টি interface কে নিয়ে একসাথে কাজ করা একটি interface এর ভেতর পরিবর্তন ঘটিয়ে। এটি Structural Design Pattern এর মধ্যে পরে। উদাহরণে Pegasus হচ্ছে adaptor class । Horse interface দৌড়ানোর আর Bird interface উড়বার কাজ করছে।TamedH আর TamedB কেবল abstract Horse ও Bird class দু'টিকে implement করছে। কিন্তু Pegasus উড়তে পারে এমন এক ঘোড়া। কাজেই Pegasus ঘোড়ার বৈশিষ্ট্য inherit করছে Horse থেকে আর উড়বার জন্য তার পাখির বৈশিষ্ট্য লাগবে সেজন্য সে Bird object কে ব্যবহার করছে attribute হিসেবে ,যা composition এর উদাহরণ। যেহেতু সে উড়বে সেজন্য Horse থেকে পাওয়া তার run() method এ আমরা Bird এর fly() method এর ব্যবহার করেছি।

উদাহরণঃ
class Horse {
constructor(){}
run(){document. write(" ");}
}
class Bird{
constructor(){}
fly(){document. write(" ");}
}
class TamedH extends Horse{
constructor (){super();}
run(){
document. write("Horse runs...");
}
}
class TamedB extends Bird{
constructor (){super ();}
fly (){
document. write("Bird flies...");
}
}
class Pegasus extends Horse{
constructor(b){
super();
this.b=b;
}
run (){
document. write(" Inside Pegasus:");
this.b.fly ();
}
}
var t=new TamedH();
t.run ();
var a=new TamedB();
a.fly();
var f=new Pegasus (a);
f.run();

চেষ্টা করা যাক: Human এবং Doll নামের দু'টি interface বানাতে হবে। এদের talk() ও animate() নামের দু'টি method থাকবে। এদের implementing class/subclass বানাতে হবে। এবার TalkingDoll নামে একটি adaptor class তৈরি করতে হবে যে Doll কে inherit করে কিন্তু composition এ Human object ব্যবহার করে। তার animate() method এ talk() method থাকবে ।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।
মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Wednesday, February 21, 2024

ফাসাদ

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,JavaScript সম্পর্কে পূর্ব ধারণা।

Façade Design Pattern:এটি অসংখ্য interfaces এর মাঝে একটি সহজ ও সমন্বিত interface তৈরি করে দেয় যাতে এসব interfaces এর কাজ ও সুবিধা এই সহজ interface ব্যবহার করে পাওয়া যায়। এর ফলে program কে জটিলতা এড়িয়ে আরো সহজ ও ব্যবহার যোগ্য করে তোলা সম্ভব হয়। উদাহরণে টিভি রিমোটের ব্যবহার দেখানো হয়েছে। Remote interface টি Volume,Brightness ও Basic interfaces এর কাজ ও সুবিধা পেতে একটি একক interface হিসেবে কাজ করছে।Basic interface টিভি অন,অফ আর মিউটের কাজ করে দিচ্ছে। Volume ও Brightness interface দু'টিতে শব্দ ও ছবির উজ্জ্বলতা বাড়ানো বা কমানোর methods দেয়া আছে। এছাড়া টিভি অন করলে আমরা যেই সাধারণ শব্দ ও ছবি পাই সেটি পেতে default নামে একটি method রয়েছে Volume ও Brightness interface দু'টিতে ।

উদাহরণঃ class Basic{
constructor(){}
on(){
document.writeln("TV is on...
");
}
off(){
document.write(" TV is off...
");
}
mute(){document.write("TV is muted...
");}
unmute(){document.write("TV is unmuted...
");}
}
class Volume{
constructor (){}
default(){document.write("Default volume
");}
up(){
document.write("Up the volume...
");
}
down(){
document.write("Down the volume...
");
}
}
class Brightness{
constructor(){}
default(){document.write("Default brightness...
");}
plus(){
document.write("More brightness...
");
}
minus(){
document.write("Less brightness...
");
}
}
class Remote{
constructor (g,s,l){
this.g=g;
this.s=s;
this.l=l;
}
on(){
this.g.on();
this.s.default();
this.l.default();
}
off(){
this.g.off();
}
vPlus(){
this.s.up();
}
vMinus(){
this.s.down();
}
bPlus(){
this.l.plus();
}
bMinus(){
this.l.minus();
}
silence(){
this.g.mute();
}
unsilence(){
this.g.unmute();
}
}
var c=new Basic();
var v=new Volume ();
var a=new Brightness ();
var r=new Remote(c,v,a);
r.on();
r.vPlus();
r.bPlus();
r.silence();
r.off();

চেষ্টা করা যাকঃএকটি গাড়ির ড্যাশবোর্ড তৈরি করতে হবে। Dashboard নামে একটি interface যার ভেতর start()[Ignition, Lock], acclim()[AC], stereo()[Music],left()[Indicator],right()[Indicator],stop()[Ignition,Lock,Music]নামের methods রয়েছে। ব্র্যাকেটে Ignition,Lock ,AC,Music ও Indicator নামের interface ব্যবহার করার কথা বলা হয়েছে। interface গুলোতে নিচের methods ব্যবহার করতে হবে:

Ignition—start(),stop ();
Lock—lockDoor(),unlockDoor();
AC--on(),off ();
Music—on(),off (),volumeUp(),volumeDown();
Indicator—leftIndic(),rightIndic();

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।

মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Tuesday, February 20, 2024

সলিড প্রিন্সিপল

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,JavaScript সম্পর্কে পূর্ব ধারণা।

SOLID Principle:কোড/প্রোগ্রাম লেখার জন্য খুবই দরকারি এক নিয়ম। Object-oriented program কে সহজবোধ্য ও তদারকির সুবিধার জন্য Robert C Martin ২০০০ সনে SOLID principle প্রবর্তন করেন। Gamma et al এর বইয়ের অনেক পরে এই নীতি আসে। পাঁচটি গুরুত্বপূর্ণ নিয়ম নিয়ে তৈরি এটি; এক এক করে জেনে নেয়া যাক নিয়মগুলো:

Single Responsibility Principle: একটি class শুধু একটি কাজই করবে।

Open-Closed Principle: interface গুলোর ভেতরে কোন পরিবর্তন করা যাবে না তবে বাড়ানো যাবে।যেমন: Name interface এর ভেতর যেকোন পরিবর্তন একেবারে বন্ধ,তবে subclass এর মাধ্যমে এর বিকাশ ঘটানো যাবে। (যেমন: Normal, Formal subclass এখানে Name class ব্যবহার করছে। Nickname নামে আরেকটি subclass এর মাধ্যমে Name class এর বিকাশ /সম্প্রসারণ ঘটানো যায়|)

Liskov Substitution Principle: derived class object প্রতিস্থাপন করবে abstract class object কে। এখানে derived class object Normal/Formal প্রতিস্থাপন করেছে abstract class Name object কে; method show() কে ব্যবহারের মাধ্যমে এটি দেখানো হচ্ছে।

Interface Segregation Principle: কাজে মিল আছে এমন method গুলোকে একই দলে রাখা। Name interface টি ব্যবহার করা হচ্ছে নাম দেখানোর জন্য; first name,last name এসব এখানে পাওয়া যাবে। এমনিভাবে Address interface ব্যবহার করা যেত ঠিকানা দেখানোর জন্য।

Dependency Inversion Principle: High and low level modules নির্ভর করবে abstraction এর উপর; details নির্ভর করবে abstraction এর উপর; subclass অনুযায়ি নাম ছাপানোর জন্য এখানে high level module Transform নির্ভর করছে abstract class Name এর উপর।

উদাহরণ: class Name{
constructor(f,l,n){
this.f=f;
this.l=l;
this.n=n;
}
show(){
document.writeln(this.f+" "+this.l+" "+this.n);
}
}
class Normal extends Name{
constructor (f,l,n){
super(f,l,n);
}
show(){
document.writeln(this.f+" "+this.l+" "+this.n+"
");
}
}
class Formal extends Name{
constructor (f,l,n){
super(f,l,n);
}
show(){
document.writeln(this.l+" "+this.f+" "+this.n+"
");
}
}
class Transform {
constructor (a){this.a=a;}
prepare(){
this.a.show ();
}
}
var a=new Formal("T","W",05);
var t=new Transform (a);
t.prepare();

চেষ্টা করা যাক:SOLID principle মেনে একটি program লেখা যাক যেখানে একজন ছাত্রের নাম,রোল,শ্রেণি screen এ দেখা যাবে।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।

মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Monday, February 19, 2024

চেইন অব রেসপন্সেবিলিটি

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,JavaScript সম্পর্কে পূর্ব ধারণা।

Chain Of Responsibilityঃএর বৈশিষ্ট্য হচ্ছে কাজ সম্পন্ন করবার জন্য command object ও receiver objects এর ব্যবহার । যে command object কাজটি করবার অনুরোধ করছে সে আগে থেকে জানবে না কোন receiver object কাজটি করবে।Receiver objects গুলো কে কোন কাজ করবে তা ঠিক করে দেয়া থাকবে। অর্থাৎ receiver objects/processing objects এর দায়িত্বগুলোর মধ্যে একটি ক্রম থাকবে।কোন receiver object কাজের অনুরোধ পাবার পর দেখবে এটি তার দায়িত্বের ভেতর পরে কি না। যদি পরে ,তাহলে সে কাজটি করবে,আর না হলে পরে যে receiver object আছে তার কাছে অনুরোধ টি পাঠিয়ে দিবে। একটি অনুরোধ অনেক receiver objects যাচাই করবার সুযোগ পাচ্ছে যতক্ষণ না পর্যন্ত যোগ্য receiver object কাজটি করছে। উদাহরণে quiz বা game এ পাওয়া score এর উপর কোন মন্তব্য/বার্তা ব্যবহার করা হবে তা দেখানো হয়েছে। এখানে command object player তার score পাঠিয়ে দেয় প্রথম receiver object Message1 এর কাছে। Message1 দেখবে score অনুযায়ি বার্তা ব্যবহার তার কাজ কি না,যদি তার দায়িত্ব হয় তবে সে যে বার্তা/মন্তব্য আছে সেটি দেখাবে,নাহলে Message2 এর কাছে পাঠাবে।এভাবে চলবে যতক্ষণ না ঠিক receiver object প্রযোজ্য বার্তা দেখাচ্ছে।

উদাহরণঃ(script tags এর মাঝে নিচের code বসবে)
class Message{
constructor (){}
show (){}
}
class Default extends Message{
constructor (){ super();}
show (){document. write("Not defined!
");
}
}
class Message3 extends Message {
constructor(a){
super();
this.a=a;}
getScore(){ return this.a;}
show (){
if (this.getScore()<=50){
document.writeln("You're on top of the world! \n");
}
else {
var m=new Default ();
m.show();
}
}
}
class Message2 extends Message {
constructor(a){super();
this.a=a;}
getScore(){ return this.a;}
show (){
if(this.getScore()>20 && this.getScore()<=30){
document.writeln("You are almost there!
");
}
else {
var m=new Message3(this.a);
m.show();
}
}
}
class Message1 extends Message {
constructor(a) {super (); this.a=a;}
getScore(){ return this.a;}
show (){
if (this.getScore()<=20) {
document.writeln("Try better! \n");
}else {
var m=new Message2(this.a);
m.show();
}
}
}
class Player {
constructor(a){this.a=a;}
message (){
var m=new Message1(this.a);
m.show();
}
}
var a=new Player (55);
a.message ();

চেষ্টা করা যাকঃ একজন customer ‌একটি পণ্যের সাথে থাকা scratch card এর নম্বর পাঠাবেন সংশ্লিষ্ট company ‘র কাছে। নাম্বার অনুযায়ি screen এ প্রদর্শিত হবে তিনি কোন পুরস্কার জিতেছেন। এখানে abstract class Prize এর subclass হলো car,motorbike, foreignTrip এবং noWin। প্রথম তিনটি subclass এর জন্য Congrats! You've won a …!! বার্তা এবং সবশেষ subclass এর জন্য দেখানো হবে Sorry,you've not won anything. Try again! বার্তাটি।


কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।

মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

Sunday, February 18, 2024

টেমপ্লেট মেথড

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance,JavaScript সম্পর্কে পূর্ব ধারণা।
Template Methodঃএই pattern এ Superclass/Abstract class এ এমন একটি method থাকে যা তার কাজটি সম্পন্ন করে বেশ কয়েকটি ধাপে। ধাপগুলো শেষ করতে আবার অন্যান্য সাহায্যকারী Method এর দরকার হয়। এসব method কি করবে তা Abstract class এ ঠিক করা হয় নয়ত subclass এ ঠিক করা হয়। নাম শুনেই বোঝা যাচ্ছে এটি অনেকটা Template এর মত কাজ করে।এটি Behavioral design pattern এর দলে পরে।

উদাহরণের abstract class ABS এর show () হচ্ছে একটি Template method যেখানে greet(),des(),date() method গুলো একটি ছকে ধাপে ধাপে সাজানো আছে। এর মধ্যে des() ও date() এর কাজ ABS classএ ঠিক করে দেয়া আছে আর greet() method subclass অনুযায়ি পরিবর্তিত হবে। এখানে আমরা Imp subclass এর object তৈরি করে superclass এর Template method প্রয়োগ করেছি।

উদাহরণঃ(script tags এর মাঝে নিচের code বসবে)
class ABS{
constructor(f,l){this.f=f; this.l=l;}
greet(){ document. write("respective greeting goes here!
");}
fname(){return this.f;}
lname(){ return this.l;}
des(){ document.writeln(this.fname()+" "+this.lname()+"
");}
date(){ document.writeln("February 16,2024
");}
show(){
this.greet();
this.des();
this.date();
}
}
class Imp extends ABS{
constructor (f,l){
super(f,l);
}
greet(){return "Hello,
";}
}
var a=new Imp("H","R");
a.det();

চেষ্টা করা যাকঃ বকেয়া চেয়ে বার্তা পাঠানো হবে কোন ক্লাবের সদস্যদের কাছে। Message নামে একটি ক্লাস যার det() method এ date(),salut() ও text() method থাকবে।date() ও text() method এর বিস্তারিত superclass এ ঠিক হবে। salut() method টির কাজ ঠিক করবে concretMessage নামের subclass। Male/Female অনুসারে Hello/Dear Mr/Mrs ঠিক হবে। সবকিছু ঠিক থাকলে নিচের বার্তা screen এ দেখা যাবে।

Date: …..
Dear/Hello Mr/Mrs ….,
How are you?Please pay your dues.
Thank you.

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.199এ" ও লেখকের তৈরি করা নানা program থেকে।

মন্তব্য ও যোগাযোগঃ mrh4478@gmail.com

La Semaine Dernière A Mes Yeux




(16 février --- 23 février)

Cliquez pour voir/cacher
Ma Semaine Gastronomique
Date Petit déjeuner Déjeuner Dîner Snacks,Sucreries,Boissons et Fritures
17 Pain,Chou,Omelette Riz,Haricots, Poisson chat à moustache longue,Soupe aux lentilles Riz,Soupe aux lentilles,Poisson chat à moustache longue ---
18 Pain,Omelette Riz,Tête de chèvre dans pois blanc Riz,Tête de chèvre dans pois blanc ---
18 Pain,Omelette Riz,Tête de chèvre dans soupe aux pois blanc Riz,Tête de chèvre dans soupe aux pois blanc ---
19 ---- Riz,Tête de chèvre dans soupe aux pois blanc,Pomme de terre avec petit poisson Riz,Omelette,Soupe aux lentilles,Pomme de terre avec petit poisson ---
20 Pain,Omelette Riz,Ruhi avec pomme de terre Riz,Ruhi avec pomme de terre ---
21 Pain,Guntéa loche Riz,Poulet Riz,Poulet ---
22 Pain,Poulet Riz,Poulet,Feuilles de haricot Riz,Chou-fleur,Soupe aux lentiless Moghlaï paratha
23 Pain,Chou-fleur Riz,Ruban sec dans haricot français Riz,Ruban sec dans haricot français ---

Saturday, February 17, 2024

ফ্যাক্টরি মেথড প্যাটার্ন

কাদের জন্যঃ Object-oriented programming language সম্পর্কে ধারণা আছে এমন মানুষ।

যা প্রয়োজনঃ class,inheritance, constructor overloading,JavaScript সম্পর্কে পূর্ব ধারণা।
Factory Method Patternঃ object তৈরির জন্য এমন এক interface বানাতে হবে যেখানে subclass/derived class ঠিক করবে কোন object তৈরি করতে হবে। Design pattern এর আদি বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994" এ এভাবেই বলা হয়েছে Factory Method pattern সম্পর্কে ।এটি creational design pattern এর দলভুক্ত। ধরা যাক একটি পণ্য,তার দাম(p) ও পরিমাণ(q) ,আমাদের বিবেচনার বিষয়। তাহলে আমাদের পণ্যের Abstract class/interface এ p এবং q এই দু'টি জিনিস অবশ্যই থাকবে আর des() নামে একটি function/method থাকবে যার সাহায্যে পণ্যের দাম ও পরিমাণ জানানো যাবে। এরপর আমরা যত খুশি Implementing/Derived/Sub class তৈরি করতে পারব। আর আমাদের লাগবে এমন একটি interface যেখানে subclass চাহিদা মত সঠিক object তৈরি করবে।

উদাহরণে একটি পণ্যের দাম 20 এবং অপরটির দাম 30 টাকা। তাই দু'টি পণ্যের জন্য দু'টি implementing class (Imp এবং Imp2) ব্যবহার করা হয়েছে। এর বাইরে আরেকটি class /interfaceব্যবহার করা হয়েছে Manager নামে যার show() method যে পণ্য সম্পর্কে তথ্য দরকার তার নাম argument হিসেবে নিবে এবং সে অনুযায়ি object তৈরি করবে।Object তার des() method এর মাধ্যমে পণ্যের দাম ,পরিমাণ জানিয়ে দিবে। কাজেই Manager হচ্ছে আমাদের Factory Method Interface এবং show() হচ্ছে Factory method.

উদাহরণঃ (script tag এর ভেতর নিচের কোড বসবে)
class ABS{
constructor(p,q){
this.p=p;
this.q=q;
}
des(){
return 'description goes here';
}
}
class Imp extends ABS{
constructor(p,q){
super(p,q);
}
static plain(p,q){
return new Imp (0,0);
}
static setP(p,q){
return new Imp(20,1);
}
des(){
document.writeln(this.p+" "+this.q);
}
}
class Imp2 extends ABS{
constructor(p,q){
super(p,q);
}
static plain(p,q){
return new Imp (0,0);
}
static setP(p,q){
return new Imp(30,1);
}
des(){
document.writeln(this.p+" "+this.q); }
}
class class Manager{
constructor (){
}
show (w){
if (w=="imp"){
var s= Imp.setP();
return s;
}
else if(w=="imp2") {
var s= Imp2.setP();
return s;
}
else{
document.writeln("Sorry, not defined!\n");
}
}
}
var m=new Manager();
var a=m.show("imp2");
a.des();

চেষ্টা করে দেখা যাকঃ Furniture নামের abstract class বানাই, যার তিনটি বৈশিষ্ট্য আমরা হিসেবে নিব--- দাম,পরিমাণ ও রঙ ।এর একটি des() method থাকবে। এরপর আমরা Sofa,Chair,Bookshelf এসব Derived class এর মাধ্যমে Factory Method Pattern ব্যবহার করে Furniture abstract class এর প্রয়োগ করব।ShopManager নামে একটি interface থাকবে Factory method ব্যবহারের জন্য।

কৃতজ্ঞতাঃ এই লেখা তৈরি করতে দরকারি তথ্য নেয়া হয়েছে Wikipedia, আকর বই "'Design Patterns:Elements Of Reusable Object-Oriented Software' by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)" ও লেখকের তৈরি করা নানা program থেকে।

মন্তব্য ও যোগাযোগ ঃ mrh4478@gmail.com

ডিজাইন প্যাটার্নস ও অন্যান্য

Software Design Patterns প্রোগ্রামিং /কোড লিখতে বেশ সাহায্য করে। প্রথম যে বইটিতে Design Pattern নিয়ে আলোচনা করা হয় সেটি হলো “Design Patterns:Elements Of Reusable Object-Oriented Software” by Eric Gamma,Richard Helm,Ralph Johnson and John Vlissides(Addisson-Wesley.1994)।সেখানে ২৩টি Design Patterns নিয়ে আলোচনা করা হয় যা মৃলতঃ C++ এ লেখা। Creational,Behavioral ও Structural এই তিন ভাগে Software Design Patterns গুলোকে সাজানো যায়। গত বছর আমার নিজের শেখার সময় সহজভাবে আমি নিজের মত করে কিছু patterns এর উদাহরণ তৈরি করি । যারা ওয়েব ডেভেলপমেন্টের কাজ করছেন তাদের কথা ভেবে এখানে উদাহরণগুলো JavaScript এ দেয়া হলো। আরেকটি সুবিধা হচ্ছে যে JavaScript এ লেখার কারণে web browser এ এগুলো চর্চা করা/চালানো যাবে,আলাদা করে compiler ব্যবহার করে এসব চালানোর প্রয়োজন হবে না । আর code গুলো smart phone ব্যবহার করে চালানো যাবে ,online compiler এর সাহায্যে।

Attention!

I have decided to use this platform to regularly publish handy blog posts in Bangla on software design patterns that I learned last year.Apart from that other essential things will also be shared.
Thank you.

Friday, February 16, 2024

Climate Commitment Or Enhancing Corruption?


Climate fund into corrupt hand
May open the alley for corruption grand.

Last week French ambassador to climate change met with Bangladeshi Foreign Minister and reiterated to provide €1 billion as part of climate change support. Earlier, French president Emmanuel Macron on his visit to Bangladesh announced to provide €1 billion to address climate challenges. The decision came at a moment when governance situation deteriorated and corruption worsened. Transparency International downgraded Bangladesh by 2 places and ranked it 10th most corrupt country in its latest corruption perception index.

Back in November 08,2021,I penned a piece titled "Commitment Or New Alley Of Corruption?". Sharing it again:

As countries and various parties in Glasgow are at loggerhead to confine the rate of annual temperature rise to 1.5° celcius by the end of this century,there has been little sign of optimism that they will be able to do that. In the mean time, Bangladesh has chalked out a plan (Nationally Determined Contribution or NDC) to reduce carbon emission by 22% by 2030,higher than 7% of the goal set by Bangladesh back in 2015. The plan,submitted to United Nations Framework Convention On Climate Change,envisages that Bangladesh will finance reduction of 6.73% carbon emission while the donors will finance the rest of its reduction commitment. Bangladesh requires $176 billion in this regard.1 & 2

The commitment demonstrates Bangladesh’s eagerness in reducing carbon emission. However, Bangladesh’s past record in managing climate fund is not clean.Transparency International Bangladesh (TIB) last year in a study found that 54% of the climate mitigation funds allotted to 7 projects were swindled and one of the culprit was secretary to a minister.3In addition, TIB in another study found 14% to 76% corruption in 4 climate change projects,with a budget of Tk 1,102 crores where Tk 191 crores were swindled.4

The outcome of foreign funded projects never ended with a happy note. Look at the status of Election Commission,Police and CHT region.UNDP led initiatives to reform electoral process of Bangladesh, modernization of Police and development of Chittagong Hill Tracts(CHT) brought only embarrassment to the stakeholders.UKAID and other donors mobilized resources so that the projects would meet the desired ends.The outcomes turned out to be costly for the nation. A controversial election was staged in 2018,Tk 4000 crores were misappropriated by a powerful state organ that contributes to UN peace mission in the name of introducing Electronic Voting Machine(EVM), a special hearing on human rights abuse by Police was held in Switzerland by an UN agency and an eruption of gun violence in CHT claiming lives of many indigenous leaders. This has been common trend of project financed by donors in Bangladesh.

And Bangladesh is replete with examples how such projects backfired. World Bank funded local governments like City Corporations ( Pourasava) and Zila Parishads through Bangladesh Municipal Development Fund(BMDF) so that they could become independent financially and accountable to local people. After a decade,it stopped funding in the project as hardly any of them showed any positive impact.5 Cox's Bazaar which could be the richest City Corporation of Bangladesh even sought Tk 26 crores to BMDF. Now look at the kind of people chaired these institutions. Borishal City Mayor and his disciples vandalized the city over a row with a bureaucrat. Secretary to Cumilla City Corporation was identified in taking part in vandalism during the Durgapuja. Disciples of Cox's Bazaar City mayor cut the city for 5-long hours from rest of Bangladesh and littered the streets with garbage after murder cases had been filed against him.

What is worrying illicit financial flow has also become a problem for the country. The figure continues to rise. Many donor countries often appointed their former ambassadors to Bangladesh to the Caribbean countries, offshore heaven of the world,and seldom integrated them back to the Foreign Ministry. An indication of how they perceive Bangladesh. Last year,British govt even dissolved UKAid and merged it with the Foreign and Commonwealth Office.6

Many argue that incidence of poverty increased in spite of the various safety net programs taken in the last couple of years.COVID-19 deteriorated the situation.That means over the years through various poverty alleviation measures,except micro credit, we failed to create a sustainable system of poverty alleviation. Micro credit institutions play crucial role to meet the working capital need of micro and small entrepreneurs. But resource mobilization and policy formulation are tasks of policy planners. And we see wrong policy and corruption often deprived the target population and derailed us from reaching the destination.

To me, fight against global warming is an individual one rather than a state-backed one.Individual can reduce carbon emission through his consumption and the way he or she lives the life. Eating less meat,consuming staple that requires less methane in the cultivation process, less dependence on fossil fuel,avoiding air-conditioned environment etc significantly improve one’s carbon emission footprint. The more conscious a nation is, the better will be its carbon footprint.Involving a corrupt state where there is lack of accountability into negotiations with perpetrators of worsening global warming is more like to play the role of a complice in a crime. Many govts may finance the pledges. But the corrupt institutions and agencies, often trained by these countries, did little to stop corruption in the disbursement and implementation of such funds. And through clandestine channels some of the misappropriated money ended up in foreign overseas banks. While one points to donors’ failure to attain the goals, they will simply shrug their responsibilities,telling the sum they paid over the years. Victim country will be double loser even if this is a simple grant because cost of $1 illicit outflow is more than receiving $1 legally. It is simply because one has to pay more taka to purchase $1 unofficially in a bid to launder it abroad. Victim country is the net loser in the sense it will face all the impacts of climate change and it cannot blame the perpetrators for not playing their roles. Even worst is that stolen money ends up in political campaign of powerful countries,dragging victim country into unwanted debate. The likelihood of which is higher than ever before.

Hydrocarbon business is booming. There is no short of investment. I am not against hydrocarbon business. Bangladesh is one of the countries that benefit a lot from this business as millions of its workers work in the Middle Eastern countries. But many find it hypocratic to call others to reduce carbon emission while engaging in activities that only increase the temperature. Without any course correction, insisting others for commitment only creates suspicion and distrust.

Notes And References

  1. “Bangladesh Pitches For Climate Sensitive Growth”,Kamran Reza Chowdhury,https://thethirdpole.net,October 25,2021 Link here
  2. “Bangladesher Ucchovilashi Lokkho,Purone Chai 15 Lakh Koti Taka(‘Ambitious Goal’ of Bangladesh,Tk 15 Lakh Crores Required)”,Iftekhar Mahmud, Daily Prothom Alo,November 02,2021.
  3. “TIB :Over 50% Climate Mitigation Funds Lost To Corruption, Mismanagement ”,Mehedi Al Amin,Dhaka Tribune,November 05,2020 Link here
  4. “TIB Study : 14% to 76% Corruption Found In Climate Change Projects”,Sohel All Mamun,Dhaka Tribune, December 24,2021Link here
  5. “Bishwabanker Rin Bondho,Sonkote Mayorra(World Bank Loan Stops,Mayors Are In Crisis) ”,Arifur Rahman,Daily Prothom Alo,August 11,2021 Link here
  6. Department For International Development Link here

Monday, February 12, 2024

La Semaine Dernière A Mes Yeux




(10 février ---16 février)

Cliquez pour voir/cacher
Ma Semaine Gastronomique
Date Petit déjeuner Déjeuner Dîner Snacks,Sucreries,Boissons et Fritures
10 Pain,Chou Riz,Ruhi,Soupe aux lentilles, Radi,Lait Riz,Radi,Haricot Pury
11 Pain,Omelette Riz,Chou-fleur Riz,Chou-fleur, Omelette ---
12 Patate douce Riz,Omelette, Soupe aux lentilles Riz,Omelette, Soupe aux lentilles Lait
13 Pain,Haricot,Œuf poché Riz,Soupe aux lentilles,Chou-fleur Riz,Soupe aux lentilles,Chou-fleur Lait
14 Pain,Pois blanc,Œuf poché Riz,Purée de pomme de terre,Tête de Ruhi avec haricot mungo Riz,Soupe aux lentilles,Purée de pomme de terre,Omelette Lait,Patate douce
15 Pain,Chou,Omelette Riz,Pois blanc,Pomme de terre Riz,Pomme de terre,Soupe aux lentilles ---
16 Pain,Chou-fleur,Œuf poché Riz,Pomme de terre avec petit poisson,Soupe aux lentilles,Chou-fleur Riz,Pomme de terre avec petit poisson,Pianju( fritures bangladaise),Soupe aux lentilles ---

Friday, February 9, 2024

Sloppy Management May Cost The Progress


Sloppy management and resources into wrong hand
May cause the progress to hit a dead end.

Current account balance became positive in July-November period of this fiscal year since Bangladesh adopted contractionary monetary policy. In 2022,Bangladesh experienced a current account deficit of $5 billion. Meanwhile, in the said period Bangladesh registered $579 million current account surplus. And the balance is improving week by week. In January this year, RMG export registered 11.45% growth compared to January 2023. This is a great news as RMG export registered negative growth for the last three months.

Gradually, govt’s reform programs become visible: central bank has already lowered cash incentives to exporters by 1%; last week, Bangladesh Energy Regulatory Commission (BERC) increased LPG prices by Taka 41,costing an LPG cylinder Taka 1474. I think more utility price hikes are on the way.

Government has not published yet the January inflation data. But egg prices marked a Taka 5 increase. Rice prices remain stable after frequent surveillance operation by the consumer rights. Liquid milk and flour/atta prices lowered. A month ago unpacked flour/atta cost more. Now in some cases unpacked flour is being sold at Taka 45 /kilo. Liquid milk registered Taka 5 decrease. Potato price has also registered Taka 10 decrease after news broke out that govt allowed import from India. However, prices of onion and winter vegetables are unreasonably high. So are the meat prices.

If pass-through effect--inflation worsened by depreciation-- reigns hard on any item, then it will be wheat followed by milk. Why? Because we import them and domestic production is not sufficient to meet the domestic need. But here we see the complete opposite: seasonal crops and perishable commodities, which are hard to store, are competing with each other in terms of increase in prices.

Amid the improvement of current account balance, Bangladesh announced to adopt “crawling peg”,an exchange rate mechanism that sets lowest and highest exchange rate of the local currency against USD before moving to fully floating exchange rate mechanism. I have come across a book written by Paul Krugman. Krugman cites example of Argentina that once adopted crawling peg and improved current account balance significantly. But it could not hold that healthy position. Capital and money came from abroad as a result of better macroeconomic situation fell into crooked management of financial institutions and groups. They misused the money and ruined the economy again. We have to capitalize the improvement from ongoing monetary policy. Letting sloppy management to reap the benefit of the better situation is equivalent to doing the same mistake again!

Tuesday, February 6, 2024

La Semaine Dernière A Mes Yeux




(03 février ---09 février)

Cliquez pour voir/cacher
Ma Semaine Gastronomique
Date Petit déjeuner Déjeuner Dîner Snacks,Sucreries,Boissons et Fritures
03 Pain,Chou Riz,Omelette, Soupe aux lentilles,Purée de feuilles de coriandre Riz, Soupe aux lentilles,Purée de feuilles de coriandre ---
04 Pain ,Omelette Riz,Purée de pomme de terre,Poulet,Soupe aux lentilles Riz,Purée de pomme de terre,Poulet Bakerkhani
05 Pain,Chou-fleur Riz,Chou-fleur,Soupe aux lentilles Riz,Omelette, Chou,Soupe aux lentilles ---
06 Patate douce Riz,Soupe aux haricots mungo,Chou-fleur Riz,Soupe aux haricots mungo,Chou-fleur Biscuits
07 Riz,Soupe aux haricots mungo,Omelette Riz,Soupe aux haricots mungo,Chou Riz,Soupe aux haricots mungo,Chou,Omelette ---
08 Pain,Œuf poché,Chou Riz,Ruhi,Broccoli Riz,Ruhi,Broccoli Lait,Bakerkhani
09 Pain,Chou-fleur,Œuf poché,Lait Riz,Pomme de terre,Ruhi,Soupe aux lentilles Riz,Pianju,Pomme de terre,Soupe aux lentilles,Ruhi ---

Friday, February 2, 2024

Better Outlook, Less Optimism


Despite good projection about inflation and growth,
Here less optimism is shown for the both.

NBR last week disclosed that around 10 million people registered as TIN holders. But only 3.5 million taxpayers submitted returns till the last day of return submission, which was extended to January 31,2024. Revenue shortfall is becoming the inevitable reality amid a commitment to increase it as part of IMF loan deal. January inflation data has not been published yet. But prices of kitchen commodities and winter fruits have shown no sign to ease. Meat items still remain out of reach to the Middle class. So we may see another hike in interest rate in coming weeks.

Government last week also announced to lower the cash incentives for the export sector. But many exporters did not appreciate it. It is a belated move when govt is increasingly feeling the pressure to cut the spending amid funding crisis.

In my post “Economic Reforms: Morning Shows The Day”, I highlighted how government plans to provide bonds to the banks and power providers instead of the due payments of Taka 220 billion may provoke inflation in the future. Last week, 5 banks received the bonds worth Taka 50 billion as payment to subsidies in fertilizer and power.

Moody’s foresees a 3%-4% depreciation of local currency as Bangladesh Bank plans to adopt “crawling peg” exchange rate mechanism before moving to market adjusted rate. It will definitely make our export items more competitive but the downside is the depreciation pass-through may worsen the inflation.

IMF in its world economic outlook update for January ,2024 sees a global growth rate of 3.1%. But Bangladesh’s biggest apparel destination USA is likely to witness decline in growth in the coming years, resulting from policy rate hikes. Consumer demand in the USA is not bouncing back soon. So uncertainty looms large on apparel export growth in the US market. Meanwhile, euro area is projected to register a positive growth in the coming years. But what political stands the USA and the EU will make following the one-sided election will have a deeper impact on the exports to these markets.IMF anticipates global inflation to fall to 5.8% in 2024 from 6.8% in 2023. IMF also acknowledges that escalation of tensions in the Middle East may cause supply side disruption and worsen the price levels, delaying the economic recovery.Downward growth projection is reported for Russia, China and Japan. India is projected to achieve 6.5% growth for this year and next year. Apparel exports to India and Japan have already reached the $ 1 billion mark. And any fall in consumer demand will likely to impact our export.

In brief, falling revenue, not-so-optimistic inflation situation cast shadow over Bangladesh’s economic recovery amid a positive global growth projection of 3.1% in 2024. Unless miracle happens in export order ,bumper crop harvest and spike in remittance inflow, Bangladesh GDP is likely to shrink in terms of USD estimates. Govt's delay in starting bold reforms throws weight behind such possibility.